3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { public int $foo; public function __get($var) { echo "__get was called for '$var'\n"; return 999; } public function __set($var, $val) { echo "__set was called for '$var'\n"; $this->{$var} = $val; } } echo "Creating instance\n\n"; $example = new Example; echo "Reading before assignment\n"; try { var_dump($example->foo); } catch (Error $e) { echo "Error: ", $e->getMessage(), "\n"; } echo "Assigning\n"; $example->foo = 42; echo "\nUnsetting\n\n"; unset($example->foo); echo "Reading after unset\n"; try { var_dump($example->foo); } catch (Error $e) { echo "Error: ", $e->getMessage(), "\n"; } echo "Assigning after explicit unset\n"; $example->foo = 42;

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.00.0110.01019.93
8.4.150.0020.00114.05
8.4.140.0130.00917.61
8.4.130.0050.00518.70
8.4.120.0150.00423.87
8.4.110.0040.00419.12
8.4.100.0130.00817.94
8.4.90.0100.01020.50
8.4.80.0120.00820.81
8.4.70.0110.00918.95
8.4.60.0110.01020.69
8.4.50.0110.01317.83
8.4.40.0120.00917.96
8.4.30.0100.01018.76
8.4.20.0060.01319.75
8.4.10.0090.00019.57
8.3.280.0090.01118.59
8.3.270.0130.00816.64
8.3.260.0120.00816.59
8.3.250.0120.00718.96
8.3.240.0100.00816.87
8.3.230.0130.00416.92
8.3.220.0100.00620.73
8.3.210.0090.00616.98
8.3.200.0050.00416.68
8.3.190.0100.00817.03
8.3.180.0140.00516.91
8.3.170.0110.00720.70
8.3.160.0070.00017.14
8.3.150.0090.00617.27
8.3.140.0040.00417.32
8.3.130.0160.00318.58
8.3.120.0090.00020.66
8.3.110.0120.00618.68
8.3.100.0060.00318.59
8.3.90.0120.00626.77
8.3.80.0060.00318.55
8.3.70.0320.00716.58
8.3.60.0340.00616.58
8.3.50.0130.00318.43
8.3.40.0270.00617.63
8.3.30.0350.00617.50
8.3.20.0190.00817.75
8.3.10.0220.00617.63
8.3.00.0290.00417.36
8.2.290.0120.00717.05
8.2.280.0040.00518.61
8.2.270.0090.00917.41
8.2.260.0090.00618.51
8.2.250.0050.00318.62
8.2.240.0000.00816.95
8.2.230.0070.00322.58
8.2.220.0040.00724.06
8.2.210.0120.00326.77
8.2.200.0060.00316.75
8.2.190.0270.00016.58
8.2.180.0170.01016.58
8.2.170.0260.00617.63
8.2.160.0310.00717.63
8.2.150.0290.00417.50
8.2.140.0210.00317.50
8.2.130.0220.00817.46
8.2.120.0140.01417.50
8.2.110.0200.00417.63
8.2.100.0200.00217.50
8.2.90.0140.01017.50
8.2.80.0180.00517.63
8.2.70.0220.00417.38
8.2.60.0260.00017.50
8.2.50.0240.00317.63
8.2.40.0190.00717.59
8.2.30.0180.00617.50
8.2.20.0140.00917.38
8.2.10.0100.01317.38
8.2.00.0200.00617.50
8.1.330.0090.00316.27
8.1.320.0090.01015.94
8.1.310.0120.00416.77
8.1.300.0110.00819.29
8.1.290.0060.00330.84
8.1.280.0230.00316.58
8.1.270.0200.01017.24
8.1.260.0210.00817.25
8.1.250.0170.01117.25
8.1.240.0190.00617.35
8.1.230.0220.00417.23
8.1.220.0200.00517.13
8.1.210.0220.00017.13
8.1.200.0240.00017.13
8.1.190.0150.00917.13
8.1.180.0210.00017.23
8.1.170.0180.00517.13
8.1.160.0140.01017.10
8.1.150.0170.00517.34
8.1.140.0190.00417.22
8.1.130.0220.00717.38
8.1.120.0190.00517.34
8.1.110.0170.01017.38
8.1.100.0190.00417.25
8.1.90.0150.00617.35
8.1.80.0120.00817.10
8.1.70.0180.00417.00
8.1.60.0210.00417.48
8.1.50.0240.00017.38
8.1.40.0240.00317.50
8.1.30.0190.00217.47
8.1.20.0240.00217.48
8.1.10.0230.00417.50
8.1.00.0220.00417.09

preferences:
41.61 ms | 406 KiB | 6 Q