3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = str_split('pierwszy string { drugi string|trzeci string {czwarty string|piąty string}} szósty string {{ósmy string| dziewiąty string} dziesiąty string}{jedenasty string| dwunasty string} trzynasty string', 1); $a = array(); $c = $a[] = ''; foreach ( $string as $val ) { switch ( $val ) { case '{': // kod break; case '|': // kod break; case '}': $c break; default: $c .= $val; break; } }

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)
5.4.130.0130.05016.26
5.4.120.0030.07016.38
5.4.110.0100.06716.46
5.4.100.0070.07316.37
5.4.90.0130.07016.42
5.4.80.0070.06016.26
5.4.70.0070.07016.41
5.4.60.0000.07316.50
5.4.50.0030.03716.31
5.4.40.0100.07016.64
5.4.30.0070.07716.40
5.4.20.0100.06716.46
5.4.10.0070.07016.44
5.4.00.0070.03315.95
5.3.230.0100.07314.61
5.3.220.0030.06714.49
5.3.210.0100.07014.50
5.3.200.0200.04014.36
5.3.190.0170.06714.45
5.3.180.0030.07314.48
5.3.170.0070.07714.65
5.3.160.0000.05714.50
5.3.150.0030.07714.54
5.3.140.0030.05714.52
5.3.130.0030.05714.49
5.3.120.0030.04714.51
5.3.110.0000.04314.34
5.3.100.0070.03313.98
5.3.90.0000.07314.00
5.3.80.0130.07013.95
5.3.70.0070.05013.96
5.3.60.0070.04013.93
5.3.50.0100.05713.87
5.3.40.0100.06013.88
5.3.30.0070.03313.83
5.3.20.0030.04713.51
5.3.10.0070.03313.64
5.3.00.0070.04713.56

preferences:
140.73 ms | 1394 KiB | 7 Q