3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { protected $state = 0; public function one() { $this->state++; return $this; } public function two() { return $this->state; } } echo "Original: " . ((new Foo())->one()?->two()) . "\n"; $foo = new Foo(); echo "Transpiled: " . ($foo->one() ? $foo->one()->two() : null);

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)
8.5.80.0050.00516.89
8.5.70.0100.00616.80
8.5.60.0060.00316.85
8.5.50.0040.00318.59
8.5.30.0100.00819.44
8.5.20.0120.00819.41
8.5.10.0140.00516.36
8.5.00.0110.01120.16
8.4.220.0050.00519.59
8.4.210.0120.00519.55
8.4.180.0140.00822.07
8.4.170.0150.00621.82
8.4.160.0120.00923.82
8.4.150.0060.00616.91
8.4.140.0150.00617.85
8.4.130.0040.00717.75
8.4.120.0100.00822.54
8.4.110.0110.00818.96
8.4.100.0110.00817.80
8.4.90.0140.00617.77
8.4.80.0040.00417.58
8.4.70.0120.00819.38
8.4.60.0130.00717.87
8.4.50.0100.00918.80
8.4.40.0100.01017.79
8.4.30.0170.00320.40
8.4.20.0130.00619.07
8.4.10.0150.00319.72
8.3.310.0080.01118.57
8.3.300.0130.00718.31
8.3.290.0110.01020.84
8.3.280.0080.01118.40
8.3.270.0080.01216.50
8.3.260.0160.00416.27
8.3.250.0080.01118.82
8.3.240.0100.00616.54
8.3.230.0050.00416.87
8.3.220.0060.00217.17
8.3.210.0080.01116.78
8.3.200.0120.00716.53
8.3.190.0110.00716.61
8.3.180.0090.01016.74
8.3.170.0070.00718.79
8.3.160.0070.01120.40
8.3.150.0120.00619.29
8.3.140.0000.00816.38
8.3.130.0000.00716.50
8.3.120.0030.00720.73
8.3.110.0030.00916.68
8.3.100.0110.00716.47
8.3.90.0000.00826.77
8.3.80.0050.00516.63
8.3.70.0120.00316.88
8.3.60.0040.01118.45
8.3.50.0040.01118.32
8.3.40.0100.00718.67
8.3.30.0140.00318.74
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0000.00726.16
8.2.310.0120.00618.07
8.2.300.0130.00818.86
8.2.290.0130.00620.60
8.2.280.0120.00716.52
8.2.270.0030.00717.13
8.2.260.0130.00616.43
8.2.250.0080.00016.84
8.2.240.0060.00317.05
8.2.230.0100.01020.94
8.2.220.0060.00324.06
8.2.210.0030.00726.77
8.2.200.0060.00316.60
8.2.190.0120.00316.75
8.2.180.0070.00725.92
8.2.170.0070.00718.87
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00819.77
8.2.110.0060.00322.10
8.2.100.0060.00322.22
8.1.340.0140.00521.61
8.1.330.0120.00816.88
8.1.320.0120.00717.91
8.1.310.0030.00618.27
8.1.300.0000.00918.41
8.1.290.0030.00630.84
8.1.280.0120.00325.92
8.1.270.0070.00023.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00720.36
8.1.230.0040.00820.29
8.0.30.0080.00916.80
8.0.20.0090.01116.86
8.0.10.0080.01116.91
8.0.00.0080.01016.96
7.4.160.0080.01016.43
7.4.150.0090.00916.37
7.4.140.0080.01016.33
7.4.130.0090.00816.23
7.4.120.0090.00916.26
7.4.110.0060.01116.27
7.4.100.0070.01116.37
7.4.90.0120.00616.24
7.4.80.0080.00916.25
7.4.70.0090.00916.29
7.4.60.0090.00716.21
7.4.50.0090.01016.19
7.4.40.0090.00916.16
7.4.30.0090.00816.27
7.4.20.0090.00916.25
7.4.10.0100.00916.24
7.4.00.0090.00916.30
7.3.270.0100.00816.16
7.3.260.0080.00816.15
7.3.250.0080.00916.18
7.3.240.0080.01016.17
7.3.230.0080.00816.18
7.3.220.0080.01016.10
7.3.210.0070.01016.12
7.3.200.0100.00716.09
7.3.190.0070.01016.09
7.3.180.0070.01016.12
7.3.170.0110.00716.10
7.3.160.0090.00816.10
7.3.150.0090.00816.11
7.3.140.0080.01016.09
7.3.130.0070.01016.10
7.3.120.0080.00916.10
7.3.110.0100.00916.02
7.3.100.0090.00916.02
7.3.90.0090.00816.34
7.3.80.0070.00916.13
7.3.70.0100.00716.13
7.3.60.0080.00916.18
7.3.50.0090.00816.20
7.3.40.0090.00916.22
7.3.30.0080.00916.21
7.3.20.0110.00816.24
7.3.10.0090.00916.15
7.3.00.0170.01116.16

preferences:
87.48 ms | 1085 KiB | 5 Q