3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test_cases = array( "abc.txt" => '.', "https://3v4l.org/?foo" => '?', "https://3v4l.org/#bar" => '#', $_SERVER['PATH'] => ':', "PHP 8.3.8" => ' ', "192.168.1.1" => '.', "foo\nbar" => "\n", "snake_case" => '_', ); foreach ($test_cases as $string => $char) { $pattern = '~^(.*)(' . preg_quote($char) . '.*)$~U'; var_dump(strtok($string,$char) == preg_replace($pattern, '$1', $string)); }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.140.0100.01018.92
8.3.130.0000.01117.04
8.3.120.0100.00019.16
8.3.110.0040.00420.94
8.3.100.0150.00024.06
8.3.90.0120.00326.77
8.3.80.0420.00630.84
8.3.70.0440.00730.84
8.3.60.0410.00730.84
8.3.50.0170.00330.84
8.3.40.0320.00730.84
8.3.30.0400.00030.84
8.3.20.0320.00830.84
8.3.10.0360.00430.84
8.3.00.0260.01330.84
8.2.250.0140.00716.70
8.2.240.0040.00417.39
8.2.230.0060.00322.58
8.2.220.0140.00737.54
8.2.210.0050.00326.77
8.2.200.0290.00630.84
8.2.190.0310.00930.84
8.2.180.0320.00430.84
8.2.170.0290.01830.84
8.2.160.0420.00630.84
8.2.150.0310.01430.84
8.2.140.0310.01230.84
8.2.130.0320.01230.84
8.2.120.0400.00430.84
8.2.110.0410.01030.84
8.2.100.0370.00730.84
8.2.90.0300.01130.84
8.2.80.0380.00330.84
8.2.70.0370.00430.84
8.2.60.0320.01130.84
8.2.50.0380.00330.84
8.2.40.0300.00930.84
8.2.30.0290.01330.84
8.2.20.0350.00730.84
8.2.10.0330.01030.84
8.2.00.0280.00430.84
8.1.300.0060.01318.12
8.1.290.0080.00830.84
8.1.280.0260.00930.84
8.1.270.0360.01030.84
8.1.260.0230.01730.84
8.1.250.0340.01030.84
8.1.240.0300.00330.84
8.1.230.0430.00430.84
8.1.220.0400.00330.84
8.1.210.0360.00630.84
8.1.200.0390.00330.84
8.1.190.0320.01030.84
8.1.180.0410.00030.84
8.1.170.0350.00330.84
8.1.160.0310.00830.84
8.1.150.0260.00830.84
8.1.140.0250.00630.84
8.1.130.0250.00630.84
8.1.120.0230.00330.84
8.1.110.0150.01130.84
8.1.100.0340.00930.84
8.1.90.0330.00730.84
8.1.80.0310.01030.84
8.1.70.0300.01230.84
8.1.60.0270.01030.84
8.1.50.0210.00430.84
8.1.40.0110.00730.84
8.1.30.0150.00430.84
8.1.20.0330.00330.84
8.1.10.0390.00730.84
8.1.00.0360.00930.84

preferences:
37.75 ms | 403 KiB | 5 Q