3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function escape($str) { return '`' . $str . '`'; } function bar() { $str = 'hello world !'; var $cb = array($this, 'escape'); return preg_replace_callback('~\w+~', function($m) use ($cb) { return call_user_func($cb, $m[0]); }, $str); } } $foo = new Foo(); echo $foo->bar();

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.6.100.0070.08321.00
5.6.90.0030.09320.97
5.6.80.0070.04020.41
5.6.70.4430.04320.40
5.5.260.0100.08320.79
5.5.250.0130.07320.46
5.5.240.0330.07020.37
5.4.420.2330.03319.41
5.4.410.2670.03719.42
5.4.400.3030.03719.14
5.4.390.3970.03019.08
5.4.380.3930.03719.20
5.4.370.3670.04018.86
5.4.360.4070.04019.18
5.4.350.4030.04019.27
5.4.340.3730.03319.25
5.4.320.0070.05319.32
5.4.310.0070.03719.09
5.4.300.3770.03719.15
5.4.290.4100.03019.24
5.4.280.3770.03719.19
5.4.270.3870.03318.94
5.4.260.4200.04018.94
5.4.250.4300.03719.26
5.4.240.4070.03318.99
5.4.230.3970.03319.07
5.4.220.1630.04019.05
5.4.210.0030.07719.09
5.4.200.0600.04719.21
5.4.190.4030.03719.05
5.4.180.4730.03318.98
5.4.170.3770.04318.97
5.4.160.3900.04318.96
5.4.150.3170.04019.20
5.4.140.2570.03716.39
5.4.130.4130.03016.51
5.4.120.4230.05016.36
5.4.110.3970.04016.41
5.4.100.4100.03016.58
5.4.90.4100.03316.54
5.4.80.4070.04016.26
5.4.70.3900.04016.25
5.4.60.3930.03316.43
5.4.50.4030.03016.62
5.4.40.4100.03016.34
5.4.30.4970.03316.42
5.4.20.4030.03016.16
5.4.10.4200.04016.56
5.4.00.3470.03715.82
5.3.290.0030.04714.75
5.3.280.3430.04714.51
5.3.270.3600.04314.69
5.3.260.3670.04314.83
5.3.250.3830.03714.83
5.3.240.3970.03714.63
5.3.230.3870.04014.76
5.3.220.4030.03314.56
5.3.210.4370.04314.65
5.3.200.3900.04314.47
5.3.190.4330.03714.69
5.3.180.3900.04014.55
5.3.170.3970.04014.64
5.3.160.4100.03714.57
5.3.150.3930.04714.68
5.3.140.3730.03314.78
5.3.130.3900.04014.42
5.3.120.4070.03714.62
5.3.110.4000.03714.47
5.3.100.4470.03314.02
5.3.90.4030.03314.24
5.3.80.3700.03714.00
5.3.70.3800.03314.04
5.3.60.3870.03714.01
5.3.50.3900.03313.97
5.3.40.4270.04013.95
5.3.30.4070.03314.00
5.3.20.3830.03013.95
5.3.10.3970.04013.95
5.3.00.4000.03313.95
5.2.170.3400.03013.95
5.2.160.3270.02313.95
5.2.150.3000.03313.95
5.2.140.3100.03013.95
5.2.130.3630.03713.95
5.2.120.3600.03313.95
5.2.110.3030.03013.95
5.2.100.3700.02313.95
5.2.90.3430.02313.95
5.2.80.3100.03713.95
5.2.70.3200.02713.95
5.2.60.3170.03013.95
5.2.50.3200.02713.95
5.2.40.2600.02013.95
5.2.30.2500.02713.95
5.2.20.2470.03013.95
5.2.10.3400.03313.95
5.2.00.3400.01713.95
5.1.60.2470.02313.95
5.1.50.2500.03013.95
5.1.40.2470.02313.95
5.1.30.3400.02013.95
5.1.20.2500.02713.95
5.1.10.2800.02013.95
5.1.00.2500.02013.95
5.0.50.1270.02313.95
5.0.40.1500.02013.95
5.0.30.1470.03013.95
5.0.20.1870.02313.95
5.0.10.1270.02013.95
5.0.00.1530.02713.95
4.4.90.1530.02013.95
4.4.80.1030.01713.95
4.4.70.1230.01713.95
4.4.60.1230.01313.95
4.4.50.1270.02013.95
4.4.40.1230.02313.95
4.4.30.0970.01713.95
4.4.20.1230.01713.95
4.4.10.0800.01713.95
4.4.00.1400.02713.95
4.3.110.1500.01313.95
4.3.100.1770.01713.95
4.3.90.1900.01313.95
4.3.80.1370.02713.95
4.3.70.0970.02013.95
4.3.60.1470.01713.95
4.3.50.1400.02013.95
4.3.40.1300.02313.95
4.3.30.0870.02013.95
4.3.20.0870.02313.95
4.3.10.0730.01713.95
4.3.00.0630.01313.95

preferences:
143.5 ms | 1398 KiB | 7 Q