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: " . (($result = $foo->one()) ? $result->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.0060.00216.91
8.5.70.0050.00216.87
8.5.60.0100.00816.78
8.5.50.0140.00316.66
8.5.30.0140.00319.50
8.5.20.0060.01019.54
8.5.10.0080.00916.66
8.5.00.0130.00719.82
8.4.230.0080.00819.66
8.4.220.0120.00919.53
8.4.210.0110.01019.64
8.4.180.0030.00722.13
8.4.170.0150.00623.97
8.4.160.0150.00723.70
8.4.150.0080.00517.87
8.4.140.0080.01317.60
8.4.130.0120.00817.69
8.4.120.0130.00720.46
8.4.110.0040.00520.33
8.4.100.0160.00517.65
8.4.90.0090.01117.38
8.4.80.0150.00217.70
8.4.70.0120.00819.65
8.4.60.0070.01418.93
8.4.50.0090.00718.35
8.4.40.0160.00317.46
8.4.30.0110.01118.58
8.4.20.0110.00718.90
8.4.10.0030.00619.42
8.3.310.0070.00218.46
8.3.300.0110.00820.87
8.3.290.0110.01220.36
8.3.280.0080.00317.06
8.3.270.0110.01016.57
8.3.260.0120.00616.52
8.3.250.0070.01118.62
8.3.240.0100.00916.55
8.3.230.0130.00716.74
8.3.220.0140.00417.41
8.3.210.0120.00816.73
8.3.200.0070.00216.73
8.3.190.0040.00416.97
8.3.180.0070.00318.60
8.3.170.0090.00017.36
8.3.160.0070.01118.82
8.3.150.0070.00718.91
8.3.140.0030.00516.70
8.3.130.0030.00618.50
8.3.120.0040.00419.09
8.3.110.0090.00920.94
8.3.100.0040.00416.91
8.3.90.0000.00826.77
8.3.80.0040.00419.36
8.3.70.0100.01016.58
8.3.60.0140.00018.43
8.3.50.0090.00918.05
8.3.40.0120.00318.54
8.3.30.0160.00318.57
8.3.20.0060.00324.18
8.3.10.0070.00024.66
8.3.00.0070.00026.16
8.2.310.0110.00817.95
8.2.300.0170.00518.86
8.2.290.0080.00622.27
8.2.280.0060.01318.13
8.2.270.0060.01218.26
8.2.260.0040.00416.50
8.2.250.0050.00318.42
8.2.240.0110.00017.12
8.2.230.0130.00922.58
8.2.220.0040.00424.06
8.2.210.0070.01126.77
8.2.200.0040.00418.88
8.2.190.0140.00718.54
8.2.180.0040.01125.92
8.2.170.0070.00718.71
8.2.160.0100.01022.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0030.00626.35
8.2.110.0090.00022.08
8.2.100.0040.00819.57
8.2.90.0050.00517.88
8.2.80.0040.00418.64
8.2.70.0040.00417.63
8.2.60.0060.00317.63
8.2.50.0030.00617.75
8.2.40.0060.00317.75
8.2.30.0030.00619.20
8.2.20.0000.00718.03
8.2.10.0030.00519.18
8.2.00.0000.00719.36
8.1.340.0110.00917.50
8.1.330.0090.00916.52
8.1.320.0100.00917.70
8.1.310.0060.00321.80
8.1.300.0110.00818.16
8.1.290.0000.00930.84
8.1.280.0060.01225.92
8.1.270.0040.00423.99
8.1.260.0040.00428.09
8.1.250.0060.00328.09
8.1.240.0120.00618.79
8.1.230.0040.00717.82
8.1.220.0070.00017.74
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0000.00917.23
8.1.180.0040.00418.10
8.1.170.0000.00717.62
8.1.160.0000.00718.80
8.1.150.0040.00418.69
8.1.140.0040.00418.76
8.1.130.0080.00020.14
8.1.120.0000.00817.40
8.1.110.0030.00517.45
8.1.100.0000.00717.34
8.1.90.0040.00417.32
8.1.80.0040.00417.29
8.1.70.0060.00317.42
8.1.60.0040.00417.63
8.1.50.0060.00317.53
8.1.40.0040.00417.52
8.1.30.0040.00417.64
8.1.20.0040.00417.61
8.1.10.0000.00917.57
8.1.00.0000.00817.40
8.0.300.0030.00318.89
8.0.290.0040.00416.75
8.0.280.0030.00318.35
8.0.270.0040.00416.71
8.0.260.0030.00318.40
8.0.250.0070.00016.96
8.0.240.0030.00316.93
8.0.230.0000.00816.87
8.0.220.0030.00516.90
8.0.210.0000.00716.90
8.0.200.0000.00616.98
8.0.190.0030.00616.86
8.0.180.0000.00916.93
8.0.170.0040.00416.90
8.0.160.0040.00416.79
8.0.150.0000.00716.75
8.0.140.0000.00716.91
8.0.130.0030.00313.27
8.0.120.0070.00316.88
8.0.110.0000.00716.78
8.0.100.0040.00416.80
8.0.90.0000.00716.77
8.0.80.0050.01416.84
8.0.70.0000.00716.91
8.0.60.0040.00416.79
8.0.50.0040.00416.79
8.0.30.0070.01216.77
8.0.20.0030.01416.83
8.0.10.0080.01216.96
8.0.00.0080.01216.90
7.4.330.0000.00515.55
7.4.320.0060.00016.56
7.4.300.0060.00016.59
7.4.290.0080.00016.59
7.4.280.0000.00716.58
7.4.270.0030.00316.49
7.4.260.0000.00513.37
7.4.250.0030.00316.62
7.4.240.0070.00016.58
7.4.230.0040.00416.67
7.4.220.0050.00216.61
7.4.210.0070.00816.56
7.4.200.0000.00716.60
7.4.160.0070.00916.61
7.4.150.0100.00516.49
7.4.140.0030.01316.44
7.4.130.0060.01016.51
7.4.120.0110.00816.46
7.4.110.0100.00516.40
7.4.100.0090.00816.45
7.4.90.0080.01016.45
7.4.80.0110.00916.44
7.4.70.0050.01416.44
7.4.60.0110.00616.56
7.4.50.0090.00816.46
7.4.40.0080.00916.45
7.4.30.0080.01016.43
7.4.20.0100.00916.48
7.4.10.0100.00916.41
7.4.00.0110.00616.51
7.3.330.0070.00016.30
7.3.320.0020.00213.26
7.3.310.0000.00716.36
7.3.300.0000.00616.31
7.3.290.0120.00416.30
7.3.270.0060.01016.26
7.3.260.0120.00716.26
7.3.250.0090.00516.29
7.3.240.0080.00916.29
7.3.230.0000.01416.29
7.3.220.0120.00516.21
7.3.210.0080.01016.18
7.3.200.0100.00816.22
7.3.190.0080.00916.29
7.3.180.0080.00716.24
7.3.170.0030.01216.28
7.3.160.0090.00716.22
7.3.150.0080.01216.17
7.3.140.0030.01516.23
7.3.130.0050.01316.25
7.3.120.0090.00716.23
7.3.110.0060.00916.10
7.3.100.0070.00716.13
7.3.90.0120.00516.49
7.3.80.0050.01216.30
7.3.70.0130.00616.26
7.3.60.0080.01116.30
7.3.50.0050.01216.33
7.3.40.0050.01016.33
7.3.30.0060.01116.33
7.3.20.0070.00816.39
7.3.10.0100.00816.28
7.3.00.0070.00916.40

preferences:
104.55 ms | 1396 KiB | 5 Q