3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SimpleClass { } $instance = new SimpleClass(); $assigned = $instance; $reference =& $instance; $instance->var = '$assigned will have this value'; $instance = null; // $instance and $reference become null var_dump($instance); var_dump($reference); var_dump($assigned);

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.10.0110.00816.77
8.5.00.0120.00920.04
8.4.160.0120.00923.82
8.4.150.0020.00114.05
8.4.140.0100.01217.70
8.4.130.0120.00817.62
8.4.120.0040.00520.62
8.4.110.0100.01022.49
8.4.100.0120.00717.86
8.4.90.0050.00417.92
8.4.80.0050.00317.96
8.4.70.0120.01017.55
8.4.60.0100.00317.70
8.4.50.0110.00917.61
8.4.40.0100.01017.60
8.4.30.0000.00818.67
8.4.20.0100.00717.89
8.4.10.0050.00319.63
8.3.290.0110.00920.91
8.3.280.0120.00918.49
8.3.270.0100.00916.55
8.3.260.0150.00416.62
8.3.250.0100.00818.80
8.3.240.0120.00716.52
8.3.230.0050.00516.64
8.3.220.0060.00417.24
8.3.210.0110.00816.53
8.3.200.0130.00616.64
8.3.190.0140.00516.56
8.3.180.0080.01016.64
8.3.170.0110.00720.63
8.3.160.0120.00620.18
8.3.150.0130.00718.64
8.3.140.0040.00416.91
8.3.130.0100.00016.89
8.3.120.0070.01118.95
8.3.110.0030.00620.94
8.3.100.0090.00016.60
8.3.90.0090.00918.42
8.3.80.0100.00018.56
8.3.70.0100.00716.88
8.3.60.0090.00918.38
8.3.50.0170.00316.85
8.3.40.0140.00719.97
8.3.30.0120.00320.25
8.3.20.0100.00821.89
8.3.10.0110.00622.73
8.3.00.0140.00420.73
8.2.300.0120.01118.54
8.2.290.0020.00720.65
8.2.280.0090.00918.55
8.2.270.0040.01517.25
8.2.260.0150.00418.46
8.2.250.0080.00016.80
8.2.240.0060.00316.72
8.2.230.0030.00622.58
8.2.220.0040.00424.06
8.2.210.0140.00726.77
8.2.200.0040.00418.42
8.2.190.0120.00318.31
8.2.180.0070.01018.54
8.2.170.0100.00718.91
8.2.160.0100.01022.96
8.2.150.0120.00519.96
8.2.140.0120.00621.35
8.2.130.0090.00622.26
8.2.120.0110.00420.93
8.2.110.0110.00420.82
8.2.100.0070.00720.62
8.2.90.0130.00320.53
8.2.80.0080.00820.71
8.2.70.0100.00720.36
8.2.60.0090.00620.54
8.2.50.0100.00720.75
8.2.40.0070.01120.56
8.2.30.0040.01220.20
8.2.20.0130.00420.27
8.2.10.0120.00620.46
8.2.00.0120.00420.56
8.1.340.0130.00619.73
8.1.330.0090.00916.85
8.1.320.0080.01116.19
8.1.310.0070.01018.25
8.1.300.0150.00016.39
8.1.290.0040.00418.88
8.1.280.0030.01025.92
8.1.270.0120.00622.93
8.1.260.0030.01023.74
8.1.250.0060.01023.80
8.1.240.0120.00320.32
8.1.230.0070.01020.28
8.1.220.0180.00020.60
8.1.210.0110.00720.23
8.1.200.0060.00920.48
8.1.190.0130.01318.56
8.1.180.0140.00720.08
8.1.170.0090.00920.47
8.1.160.0120.00620.23
8.1.150.0080.00820.52
8.1.140.0130.00320.17
8.1.130.0080.00820.35
8.1.120.0090.00920.34
8.1.110.0070.01020.13
8.1.100.0160.00020.29
8.1.90.0140.00320.33
8.1.80.0130.00321.44
8.1.70.0030.01320.29
8.1.60.0090.00620.48
8.1.50.0200.00418.45
8.1.40.0140.00718.53
8.1.30.0130.00720.52
8.1.20.0180.00420.00
8.1.10.0130.00718.57
8.1.00.0140.00420.05

preferences:
30.72 ms | 403 KiB | 5 Q