@ 2024-05-29T21:22:58Z <?php
$text = '44-xkIolspO';
sscanf($text, '%d-%s', $one, $two);
var_dump($one, $two);
unset($one, $two);
[$one, $two] = sscanf($text, '%d-%s');
var_dump($one, $two);
unset($one, $two);
[$one, $two] = explode('-', $text);
var_dump($one, $two);
unset($one, $two);
[$one, $two] = str_getcsv($text, '-');
var_dump($one, $two);
unset($one, $two);
[$one, $two] = preg_split('/-/', $text);
var_dump($one, $two);
unset($one, $two);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.4.1 - 8.4.12 int(44)
string(8) "xkIolspO"
int(44)
string(8) "xkIolspO"
string(2) "44"
string(8) "xkIolspO"
Deprecated: str_getcsv(): the $escape parameter must be provided as its default value will change in /in/WpeGA on line 17
string(2) "44"
string(8) "xkIolspO"
string(2) "44"
string(8) "xkIolspO"
Output for 7.2.20 , 8.1.0 - 8.1.33 , 8.2.0 - 8.2.29 , 8.3.0 - 8.3.25 int(44)
string(8) "xkIolspO"
int(44)
string(8) "xkIolspO"
string(2) "44"
string(8) "xkIolspO"
string(2) "44"
string(8) "xkIolspO"
string(2) "44"
string(8) "xkIolspO"
preferences:dark mode live preview ace vim emacs key bindings
79.82 ms | 408 KiB | 5 Q