3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = base64_encode(md5('')); $start = microtime(true); for ($i = 0; $i < 100; ++$i) { $result = []; do { $result[] = $value; $value = substr($value, 0, -1); } while ('' !== $value); $result = array_reverse($result); } $end = microtime(true); echo $i/($end - $start), ' op/s', PHP_EOL; var_dump($result);

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)
7.3.10.0890.08150.33
7.3.00.1210.08250.63
7.2.130.0990.07550.59
7.2.120.2100.07450.53
7.2.110.2050.08550.69
7.2.100.0430.07650.95
7.2.90.0260.08150.83
7.2.80.0270.08950.66
7.2.70.0340.07550.97
7.2.60.0340.08050.88
7.2.50.0310.09750.86
7.2.40.0260.09150.85
7.2.30.0260.09550.87
7.2.20.0290.09550.56
7.2.10.0250.09550.80
7.2.00.0210.08950.86
7.1.250.1190.14649.35
7.1.70.0170.06151.10
7.1.60.0200.10851.35
7.1.50.0200.05351.27
7.1.00.0030.16056.31
7.0.201.4430.06748.36
7.0.140.0100.14756.00
7.0.60.0370.13352.93
7.0.50.0430.12350.81
7.0.40.0170.13051.98
7.0.30.1170.10751.89
7.0.20.1030.13751.68
7.0.10.0200.09351.63
7.0.00.0130.12051.89
5.6.280.0270.22385.55
5.6.210.0200.15385.39
5.6.200.0130.22082.75
5.6.190.0300.16384.91
5.6.180.0370.15784.99
5.6.170.0770.17384.92
5.6.160.0300.17384.96
5.6.150.0330.15082.57
5.6.140.0330.15782.73
5.6.130.0370.21082.55
5.6.120.0270.17085.75
5.6.110.0200.20785.62
5.6.100.0370.14085.60
5.6.90.0430.15785.77
5.6.80.0330.18785.03
5.5.350.0430.21085.10
5.5.340.0300.18782.59
5.5.330.0170.17784.73
5.5.320.0230.20784.76
5.5.310.0600.21084.78
5.5.300.0100.20082.56
5.5.290.0130.16382.60
5.5.280.0330.16085.39
5.5.270.0470.13785.42
5.5.260.0170.21785.57
5.5.250.0330.21785.43
5.5.240.0200.15384.80
5.4.450.0370.18083.83
5.4.440.0470.20783.78
5.4.430.0370.25784.07
5.4.420.0530.25784.05
5.4.410.0500.25783.81
5.4.400.2900.00083.40
5.4.390.3100.00083.11
5.4.380.0900.24783.30
5.4.370.1500.25083.29
5.4.360.1730.26783.15
5.4.350.0530.25083.09
5.4.340.0670.22083.14
5.4.320.0250.19277.09
5.4.310.0260.17177.09
5.4.300.0220.17177.10
5.4.290.0280.17577.09
5.4.280.0200.19376.99
5.4.270.0280.17976.99
5.4.260.0330.29383.41
5.4.250.0570.29383.19
5.4.240.0370.23383.20
5.4.230.0630.20783.32
5.4.220.0670.31383.35
5.4.210.0470.22383.46
5.4.200.0370.25383.23
5.4.190.0430.22083.40
5.4.180.0470.27783.41
5.4.170.0430.24383.33
5.4.160.0400.24083.31
5.4.150.0270.24783.23
5.4.140.0470.22380.93
5.4.130.0270.24081.04
5.4.120.0370.24380.87
5.4.110.0500.26780.82
5.4.100.0400.23381.01
5.4.90.0330.23081.01
5.4.80.0370.24080.89
5.4.70.0400.24380.80
5.4.60.0470.23080.90
5.4.50.0430.27080.96
5.4.40.0500.23080.88
5.4.30.0600.25380.78
5.4.20.0200.26781.01
5.4.10.0300.25080.74
5.4.00.0430.26780.45
5.3.290.0030.04212.80
5.3.280.0070.05014.61
5.3.270.0030.05714.61
5.3.260.0070.05014.60
5.3.250.0030.05314.70
5.3.240.0000.05714.62
5.3.230.0030.05314.59
5.3.220.0030.05014.66
5.3.210.0070.05314.57
5.3.200.0070.05014.63
5.3.190.0130.04014.63
5.3.180.0070.05314.56
5.3.170.0200.06014.61
5.3.160.0000.05314.57
5.3.150.0070.05014.66
5.3.140.0030.05314.57
5.3.130.0070.05314.42
5.3.120.0070.06014.44
5.3.110.0130.04314.25
5.3.100.0000.06314.08
5.3.90.0030.05314.17
5.3.80.0170.04314.04
5.3.70.0030.05313.79

preferences:
32 ms | 401 KiB | 5 Q