Q:

How to get post slug from post in WordPress? 

I want to get "abc_15_11_02_3" from http://example.com/project_name/abc_15_11_02_3/. How can i do this? 

A:

You can get that using the following methods:
<? php $post_slug = get_post_field( 'post_name', get_post() ); ? >

Or You can use this easy code:
<? php
    global $post;
    $post_slug = $post->post_name;
? >

A:

If you want to get slug of the post from the loop then use:
global $post;
echo $post->post_name;

If you want to get slug of the post outside the loop then use:
$post_id = 45; //specify post id here
$post = get_post($post_id); 
$slug = $post->post_name;

A:

You can do this is in many ways like:
1- You can use Wordpress global variable $post :
<? php 
global $post;
$post_slug=$post->post_name;
? >

2- Or you can get use:
$slug = get_post_field( 'post_name', get_post() );

3- Or get full url and then use the PHP function parse_url:
$url      = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$url_path = parse_url( $url, PHP_URL_PATH );
$slug = pathinfo( $url_path, PATHINFO_BASENAME );

I hope above methods will help you.