3v4l.org

run code in 300+ PHP versions simultaneously
<?php class string { protected $value; function __construct($value){ $this->value = $value; } protected __toString(){ return $value; } } function foo(string $s) { echo $s; } foo(new string("hello world"));

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.240.0140.04712.39
5.4.230.0130.05412.38
5.4.220.0160.05712.38
5.4.210.0150.05612.38
5.4.200.0160.06012.38
5.4.190.0160.08112.38
5.4.180.0120.04512.38
5.4.170.0150.04912.38
5.4.160.0190.05612.37
5.4.150.0170.06412.37
5.4.140.0130.06412.06
5.4.130.0160.06512.04
5.4.120.0180.07212.01
5.4.110.0240.06012.00
5.4.100.0190.03412.00
5.4.90.0150.04212.00
5.4.80.0120.04612.00
5.4.70.0200.07212.00
5.4.60.0120.04612.00
5.4.50.0080.04612.00
5.4.40.0140.05511.98
5.4.30.0140.04511.98
5.4.20.0150.05211.98
5.4.10.0140.05211.98
5.4.00.0140.04511.47
5.3.280.0220.06212.71
5.3.270.0130.04512.72
5.3.260.0170.07512.72
5.3.250.0100.05312.72
5.3.240.0140.05212.72
5.3.230.0120.04312.71
5.3.220.0110.04112.68
5.3.210.0150.04712.68
5.3.200.0160.04612.68
5.3.190.0150.04712.68
5.3.180.0130.04712.67
5.3.170.0150.04712.67
5.3.160.0190.07212.67
5.3.150.0120.04912.67
5.3.140.0140.05212.66
5.3.130.0140.05812.66
5.3.120.0120.04912.66
5.3.110.0140.05212.66
5.3.100.0120.04212.12
5.3.90.0120.04312.08
5.3.80.0120.04112.07
5.3.70.0120.04712.07
5.3.60.0130.04212.06
5.3.50.0140.04212.00
5.3.40.0120.04312.00
5.3.30.0130.04211.95
5.3.20.0110.04311.73
5.3.10.0340.08211.69
5.3.00.0140.04311.68
5.2.170.0070.0429.18
5.2.160.0050.0399.18
5.2.150.0150.0349.18
5.2.140.0110.0329.18
5.2.130.0090.0329.14
5.2.120.0110.0309.14
5.2.110.0210.0429.14
5.2.100.0090.0319.15
5.2.90.0070.0349.14
5.2.80.0100.0329.13
5.2.70.0100.0419.13
5.2.60.0110.0399.09
5.2.50.0070.0429.06
5.2.40.0130.0369.03
5.2.30.0270.0569.00
5.2.20.0130.0329.00
5.2.10.0140.0308.91
5.2.00.0090.0358.77
5.1.60.0090.0328.05
5.1.50.0070.0318.04
5.1.40.0100.0328.03
5.1.30.0110.0338.38
5.1.20.0070.0358.41
5.1.10.0110.0298.13
5.1.00.0140.0348.12
5.0.50.0180.0306.60
5.0.40.0050.0266.46
5.0.30.0070.0346.28
5.0.20.0070.0216.24
5.0.10.0070.0216.22
5.0.00.0050.0356.21
4.4.90.0040.0194.78
4.4.80.0070.0164.75
4.4.70.0040.0194.76
4.4.60.0050.0164.76
4.4.50.0060.0164.77
4.4.40.0100.0534.71
4.4.30.0040.0194.76
4.4.20.0050.0184.84
4.4.10.0070.0164.85
4.4.00.0050.0274.76
4.3.110.0070.0164.67
4.3.100.0050.0164.66
4.3.90.0080.0154.63
4.3.80.0070.0304.58
4.3.70.0080.0184.63
4.3.60.0050.0184.63
4.3.50.0050.0324.63
4.3.40.0070.0264.54
4.3.30.0040.0173.29
4.3.20.0040.0183.26
4.3.10.0030.0183.23
4.3.00.0030.01013.64

preferences:
139.16 ms | 1386 KiB | 7 Q