Skip to content

Instantly share code, notes, and snippets.

@phpfiddle
Created March 14, 2017 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phpfiddle/5766e58cdb5cf0ea646c70ed4dcc7649 to your computer and use it in GitHub Desktop.
Save phpfiddle/5766e58cdb5cf0ea646c70ed4dcc7649 to your computer and use it in GitHub Desktop.
[ Posted by Abdelfattah ] php explode explode
<?php
$data = "foo:*:1023:1000::/home/foo:/bin/sh";
list($user, $pass, $uid, $gid, $gecos, $home, $shell) = explode(":", $data);
echo $user; // foo
echo $pass; // *
echo $uid; //1023
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment