3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public $prop = 0; public function &getPropRef () { return (int)$this->prop; } } $obj = new Foo(); $variable = &$obj->getPropRef(); $variable = 1; $variable = 2; $variable = 3; echo $obj->prop;

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.90.0120.00717.04
8.5.80.0050.00316.58
8.5.70.0100.00816.75
8.5.60.0110.00716.75
8.5.50.0110.00616.73
8.5.30.0080.00819.50
8.5.20.0110.00620.09
8.5.10.0150.00316.93
8.5.00.0090.01120.21
8.4.240.0150.00421.35
8.4.230.0040.00619.64
8.4.220.0080.01319.63
8.4.210.0090.00819.55
8.4.180.0130.00819.70
8.4.170.0130.00923.88
8.4.160.0100.01123.79
8.4.150.0080.00516.96
8.4.140.0100.01117.58
8.4.130.0130.00817.97
8.4.120.0140.00620.46
8.4.110.0090.01122.55
8.4.100.0110.00717.66
8.4.90.0090.01018.05
8.4.80.0080.00918.09
8.4.70.0070.01417.64
8.4.60.0060.00319.75
8.4.50.0110.00817.88
8.4.40.0130.00717.64
8.4.30.0130.00618.53
8.4.20.0130.00619.56
8.4.10.0060.00319.43
8.3.330.0060.00418.49
8.3.320.0070.00620.21
8.3.310.0110.00818.51
8.3.300.0140.00722.82
8.3.290.0140.00718.42
8.3.280.0140.00718.39
8.3.270.0110.00916.65
8.3.260.0090.00816.77
8.3.250.0090.01018.75
8.3.240.0060.00316.61
8.3.230.0090.01016.93
8.3.220.0100.00817.09
8.3.210.0090.00816.69
8.3.200.0050.00418.46
8.3.190.0100.00816.67
8.3.180.0040.00518.54
8.3.170.0110.00720.74
8.3.160.0080.00817.14
8.3.150.0060.01217.04
8.3.140.0000.00819.11
8.3.130.0080.00018.42
8.3.120.0120.00618.80
8.3.110.0060.00320.94
8.3.100.0050.00524.06
8.3.90.0090.00026.77
8.3.80.0040.00418.68
8.3.70.0070.01416.47
8.3.60.0160.00016.68
8.3.50.0150.00316.81
8.3.40.0140.00721.86
8.3.30.0100.00720.00
8.3.20.0130.00723.62
8.3.10.0080.00821.78
8.2.320.0080.00418.24
8.2.310.0090.01118.21
8.2.300.0140.00618.11
8.2.290.0110.00820.43
8.2.280.0100.00818.42
8.2.270.0150.00318.93
8.2.260.0120.00618.34
8.2.250.0060.00918.21
8.2.240.0060.00317.19
8.2.230.0050.00322.58
8.2.220.0090.00037.54
8.2.210.0000.01426.77
8.2.200.0040.00418.29
8.2.190.0150.00616.63
8.2.180.0090.00918.41
8.2.170.0040.01119.08
8.2.160.0100.00722.96
8.2.150.0180.00022.96
8.2.140.0100.00722.96
8.1.340.0100.01018.25
8.1.330.0090.00918.36
8.1.320.0090.01015.90
8.1.310.0040.00418.57
8.1.300.0090.00620.20
8.1.290.0040.00430.84
8.1.280.0100.01025.92
8.1.270.0110.00623.86

preferences:
90.02 ms | 860 KiB | 5 Q