3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { public static int $int = 1; public string $string = 'abc'; } function foo() { $foo = new X(); $varString = &$foo->string; $varString = []; //Cannot assign array to reference held by property X::$string of type string $varInt = &X::$int; $varInt = 'abc'; //Cannot assign string to reference held by property X::$int of type int } foo();

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.60.0100.00916.82
8.5.50.0110.00616.89
8.5.30.0090.00818.03
8.5.20.0120.00520.04
8.5.10.0100.01216.84
8.5.00.0130.00920.33
8.4.210.0130.00921.60
8.4.180.0110.01022.04
8.4.170.0150.00623.90
8.4.160.0110.01025.73
8.4.150.0080.00616.96
8.4.140.0150.00617.49
8.4.130.0050.00518.76
8.4.120.0130.00724.13
8.4.110.0080.00720.76
8.4.100.0150.00618.59
8.4.90.0140.00620.68
8.4.80.0190.00818.33
8.4.70.0250.00617.91
8.4.60.0200.00518.02
8.4.50.0270.00617.75
8.4.40.0280.00517.64
8.4.30.0260.00617.54
8.4.20.0240.00817.86
8.4.10.0220.00517.73
8.3.300.0090.01320.77
8.3.290.0130.01120.88
8.3.280.0090.01020.19
8.3.270.0100.00916.63
8.3.260.0120.00816.78
8.3.250.0110.00818.84
8.3.240.0060.00517.09
8.3.230.0100.00816.61
8.3.220.0200.00616.87
8.3.210.0250.00516.59
8.3.200.0230.00516.60
8.3.190.0180.00316.67
8.3.180.0180.00516.70
8.3.170.0210.00316.69
8.3.160.0270.00616.71
8.3.150.0220.00416.65
8.3.140.0240.00716.69
8.3.130.0230.00416.65
8.3.120.0160.00616.71
8.3.110.0160.00516.67
8.3.100.0210.00416.75
8.3.90.0190.00416.67
8.3.80.0200.00516.75
8.3.70.0220.00716.66
8.3.60.0260.00416.68
8.3.50.0260.00616.65
8.3.40.0260.00617.46
8.3.30.0220.00517.52
8.3.20.0210.00617.48
8.3.10.0240.00317.43
8.3.00.0120.00418.26
8.2.300.0120.00818.25
8.2.290.0080.01020.42
8.2.280.0220.00316.70
8.2.270.0160.00517.42
8.2.260.0190.00616.49
8.2.250.0140.00516.74
8.2.240.0190.00516.63
8.2.230.0170.00417.26
8.2.220.0210.00516.79
8.2.210.0190.00617.28
8.2.200.0210.00516.79
8.2.190.0190.00716.67
8.2.180.0180.00416.75
8.2.170.0210.00817.64
8.2.160.0240.00417.61
8.2.150.0200.00517.45
8.2.140.0220.00617.56
8.2.130.0220.00517.41
8.2.120.0230.00517.50
8.2.110.0240.00417.33
8.2.100.0230.00417.58
8.2.90.0250.00517.46
8.2.80.0220.00817.44
8.2.70.0220.00517.42
8.2.60.0200.00618.49
8.2.50.0140.00617.49
8.2.40.0200.00317.33
8.2.30.0200.00517.42
8.2.20.0200.00517.48
8.2.10.0180.00617.81
8.2.00.0170.00617.51
8.1.340.0120.00821.86

preferences:
63.66 ms | 864 KiB | 5 Q