3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { private $_foo; public function __construct($foo) { $this->_foo = $foo; } public function bar($a) { return ($a + $this->_foo) } } $n = new X(1); echo $n->bar(5);

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.350.0070.04112.04
5.4.340.0160.04912.03
5.4.320.0190.06212.52
5.4.310.0110.05912.52
5.4.300.0090.06712.52
5.4.290.0200.06912.52
5.4.280.0170.06712.41
5.4.270.0220.09812.41
5.4.260.0200.09912.41
5.4.250.0050.04712.41
5.4.240.0080.06312.41
5.4.230.0060.04312.40
5.4.220.0150.04412.40
5.4.210.0140.04112.40
5.4.200.0100.03812.40
5.4.190.0170.06612.40
5.4.180.0110.05112.40
5.4.170.0080.05712.41
5.4.160.0130.04612.41
5.4.150.0080.04412.40
5.4.140.0100.03912.09
5.4.130.0070.04112.07
5.4.120.0120.04412.04
5.4.110.0110.03612.04
5.4.100.0100.04112.03
5.4.90.0110.04712.03
5.4.80.0110.04412.04
5.4.70.0090.04812.03
5.4.60.0100.03912.03
5.4.50.0060.04012.03
5.4.40.0080.04412.02
5.4.30.0090.05912.02
5.4.20.0030.04412.01
5.4.10.0080.03612.02
5.4.00.0110.03311.50
5.3.290.0090.04512.80
5.3.280.0060.04212.71
5.3.270.0120.04112.73
5.3.260.0070.04412.72
5.3.250.0090.04612.71
5.3.240.0130.06412.72
5.3.230.0150.05412.71
5.3.220.0140.04412.68
5.3.210.0070.04612.68
5.3.200.0080.05012.68
5.3.190.0080.07712.68
5.3.180.0170.04312.67
5.3.170.0140.04912.67
5.3.160.0070.05112.67
5.3.150.0170.06912.67
5.3.140.0100.04712.66
5.3.130.0120.04912.66
5.3.120.0120.05112.66
5.3.110.0130.04712.66
5.3.100.0080.04912.13
5.3.90.0130.04712.11
5.3.80.0070.04312.09
5.3.70.0110.04412.09
5.3.60.0080.04612.08
5.3.50.0070.05012.04
5.3.40.0140.04712.03
5.3.30.0130.06511.99
5.3.20.0110.04611.77
5.3.10.0050.04011.73
5.3.00.0070.03711.72
5.2.170.0120.0359.22
5.2.160.0100.0389.22
5.2.150.0080.0409.23
5.2.140.0070.0429.22
5.2.130.0100.0369.18
5.2.120.0100.0339.18
5.2.110.0050.0399.20
5.2.100.0110.0639.19
5.2.90.0120.0399.19
5.2.80.0060.0499.18
5.2.70.0090.0459.18
5.2.60.0150.0399.13
5.2.50.0140.0359.10
5.2.40.0070.0409.07
5.2.30.0090.0399.06
5.2.20.0040.0429.04
5.2.10.0080.0408.95
5.2.00.0090.0408.81
5.1.60.0130.0348.09
5.1.50.0090.0348.09
5.1.40.0070.0338.07
5.1.30.0090.0318.42
5.1.20.0040.0388.45
5.1.10.0090.0308.17
5.1.00.0050.0368.16
5.0.50.0050.0226.65
5.0.40.0030.0236.50
5.0.30.0050.0336.32
5.0.20.0070.0226.29
5.0.10.0060.0226.26
5.0.00.0100.0356.25
4.4.90.0090.0174.78
4.4.80.0040.0224.75
4.4.70.0030.0234.75
4.4.60.0040.0174.75
4.4.50.0040.0224.77
4.4.40.0060.0264.71
4.4.30.0030.0224.76
4.4.20.0050.0174.84
4.4.10.0030.0174.85
4.4.00.0050.0324.76
4.3.110.0030.0234.67
4.3.100.0050.0214.67
4.3.90.0080.0214.64
4.3.80.0030.0284.58
4.3.70.0050.0184.63
4.3.60.0010.0174.63
4.3.50.0010.0184.63
4.3.40.0040.0254.54
4.3.30.0060.0143.30
4.3.20.0030.0173.28
4.3.10.0060.0163.23
4.3.00.0200.0176.76

preferences:
146.79 ms | 1386 KiB | 7 Q