3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public int $bar; public function __get($name) { echo "__get\n"; return 43; } public function __set($name, $value) { echo "__set\n"; } } $foo = new Foo(); echo "Read before assignment:\n"; try { echo $foo->bar, "\n"; } catch (Throwable $e) { echo $e->getMessage(), "\n"; } echo "Assignment before unset:\n"; $foo->bar = 42; unset($foo->bar); echo "Assignment after unset:\n"; $foo->bar = 42; echo "Read after unset:\n"; echo $foo->bar, "\n";

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.30.0110.00619.55
8.5.20.0080.00919.41
8.5.10.0100.00720.26
8.5.00.0120.00920.07
8.4.180.0080.01419.77
8.4.170.0130.00823.92
8.4.160.0140.00923.73
8.4.150.0070.00517.82
8.4.140.0120.01017.79
8.4.130.0100.00918.92
8.4.120.0100.01024.02
8.4.110.0130.00919.09
8.4.100.0100.01118.01
8.4.90.0060.00317.82
8.4.80.0140.00417.95
8.4.70.0070.00918.04
8.4.60.0080.01218.65
8.4.50.0090.01019.46
8.4.40.0110.00817.59
8.4.30.0130.00720.63
8.4.20.0030.00519.88
8.4.10.0090.00023.79
8.3.300.0120.00918.99
8.3.290.0130.00720.66
8.3.280.0140.00718.29
8.3.270.0120.00716.51
8.3.260.0100.00916.76
8.3.250.0140.00518.71
8.3.240.0100.01117.03
8.3.230.0070.00216.58
8.3.220.0100.00816.81
8.3.210.0100.00916.61
8.3.200.0050.00416.59
8.3.190.0120.00717.23
8.3.180.0130.00616.20
8.3.170.0110.00718.85
8.3.160.0160.00316.73
8.3.150.0060.01219.02
8.3.140.0150.00019.06
8.3.130.0040.00418.38
8.3.120.0100.00618.82
8.3.110.0000.01120.94
8.3.100.0090.00318.54
8.3.90.0000.00826.77
8.3.80.0060.00318.43
8.3.70.0110.00416.75
8.3.60.0060.01216.61
8.3.50.0120.00418.42
8.3.40.0070.00720.07
8.3.30.0100.00719.00
8.3.20.0040.00424.18
8.3.10.0020.00524.66
8.3.00.0060.00326.16
8.2.300.0130.00718.22
8.2.290.0050.00318.93
8.2.280.0040.00718.36
8.2.270.0130.00316.63
8.2.260.0070.01118.30
8.2.250.0060.00316.63
8.2.240.0120.00618.78
8.2.230.0000.00822.58
8.2.220.0000.00824.06
8.2.210.0110.00426.77
8.2.200.0040.00416.75
8.2.190.0110.01116.58
8.2.180.0070.01425.92
8.2.170.0120.00319.13
8.2.160.0070.00722.96
8.2.150.0000.00825.66
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0070.00026.16
8.2.110.0060.00320.82
8.2.100.0100.00317.80
8.2.90.0000.00719.05
8.2.80.0000.00817.97
8.2.70.0030.00617.75
8.2.60.0050.00317.68
8.2.50.0030.00518.10
8.2.40.0050.00320.42
8.2.30.0060.00317.93
8.2.20.0070.00020.49
8.2.10.0040.00418.18
8.2.00.0060.00319.05
8.1.340.0130.00917.68
8.1.330.0150.00416.35
8.1.320.0090.01116.42
8.1.310.0040.01516.82
8.1.300.0090.00019.54
8.1.290.0060.00330.84
8.1.280.0130.00925.92
8.1.270.0100.00324.66
8.1.260.0060.00326.35
8.1.250.0000.00728.09
8.1.240.0030.00622.19
8.1.230.0110.00019.04
8.1.220.0040.00417.74
8.1.210.0000.01018.77
8.1.200.0000.00817.22
8.1.190.0040.00417.22
8.1.180.0050.00318.10
8.1.170.0040.00418.46
8.1.160.0080.00318.82
8.1.150.0000.00718.44
8.1.140.0000.00717.31
8.1.130.0060.00418.02
8.1.120.0080.00218.64
8.1.110.0060.00518.61
8.1.100.0070.00318.63
8.1.90.0080.00318.07
8.1.80.0050.00518.08
8.1.70.0040.00718.06
8.1.60.0040.00718.22
8.1.50.0050.00618.10
8.1.40.0070.00418.21
8.1.30.0090.00218.22
8.1.20.0050.00618.26
8.1.10.0070.00418.16
8.1.00.0050.00618.09
8.0.300.0050.00518.77
8.0.290.0000.00716.75
8.0.280.0040.00418.34
8.0.270.0000.00717.30
8.0.260.0060.00417.84
8.0.250.0060.00517.89
8.0.240.0050.00617.89
8.0.230.0060.00417.88
8.0.220.0040.00617.85
8.0.210.0040.00717.82
8.0.200.0050.00517.87
8.0.190.0040.00617.84
8.0.180.0070.00417.89
8.0.170.0100.00217.47
8.0.160.0080.00317.47
8.0.150.0050.00517.47
8.0.140.0060.00317.47
8.0.130.0070.00317.47
8.0.120.0050.00517.47
8.0.110.0060.00417.47
8.0.100.0060.00317.47
8.0.90.0070.00317.47
8.0.80.0070.00317.47
8.0.70.0050.00517.47
8.0.60.0100.00017.47
8.0.50.0070.00317.47
8.0.30.0020.00717.47
8.0.20.0040.00617.47
8.0.10.0070.00317.47

preferences:
100.67 ms | 1125 KiB | 5 Q