3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '15_some_text_or_numbers'; var_dump( sscanf($string, '%d')[0], (int) $string, preg_replace('/^\d+\K.*/', '', $string), preg_match('/^\d+/', $string, $m) ? $m[0] : null, strstr($string . '_', '_', true), // append an underscore to the input if not guaranteed explode('_', $string, 2)[0], // the limit parameter prevents needeless explosions strtok($string, '_') );
Output for git.master, git.master_jit
/bin/php-git-master: error while loading shared libraries: libonig.so.5: cannot open shared object file: No such file or directory
Process exited with code 127.
Output for rfc.property-hooks
int(15) int(15) string(2) "15" string(2) "15" string(2) "15" string(2) "15" string(2) "15"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
34.71 ms | 406 KiB | 5 Q