3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B { } class A { public function M() { echo("this=" . get_class($this) . "\n"); $x = "this"; $$x = new B(); echo("this=" . get_class($this) . "\n"); } } $a = new A(); $a->M(); echo get_class($a);

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.3.60.0180.00316.63
8.3.50.0190.00721.06
8.3.40.0120.00318.75
8.3.30.0090.00618.76
8.3.20.0050.00220.16
8.3.10.0030.00621.81
8.3.00.0040.00420.16
8.2.180.0070.01116.50
8.2.170.0090.00922.96
8.2.160.0040.01120.39
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0040.00417.75
8.2.110.0090.00320.45
8.2.100.0040.00818.05
8.2.90.0030.00619.18
8.2.80.0000.00817.97
8.2.70.0040.00417.61
8.2.60.0000.00917.80
8.2.50.0000.00818.07
8.2.40.0000.00719.34
8.2.30.0050.00522.39
8.2.20.0040.00417.82
8.2.10.0040.00418.05
8.2.00.0040.00418.12
8.1.280.0070.00725.92
8.1.270.0130.00723.68
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00022.54
8.1.230.0130.00017.42
8.1.220.0050.00317.77
8.1.210.0000.00818.77
8.1.200.0000.00817.35
8.1.190.0000.00817.35
8.1.180.0030.00518.10
8.1.170.0050.00318.59
8.1.160.0040.00421.93
8.1.150.0000.00818.89
8.1.140.0030.00617.52
8.1.130.0070.00017.64
8.1.120.0060.00317.36
8.1.110.0040.00417.35
8.1.100.0000.00717.42
8.1.90.0040.00417.49
8.1.80.0070.00317.43
8.1.70.0030.00317.39
8.1.60.0000.00717.60
8.1.50.0030.00517.52
8.1.40.0040.00417.51
8.1.30.0060.00317.60
8.1.20.0070.00017.52
8.1.10.0050.00317.44
8.1.00.0000.00817.46
8.0.300.0000.00918.77
8.0.290.0040.00416.75
8.0.280.0070.00018.45
8.0.270.0000.00817.15
8.0.260.0000.00717.13
8.0.250.0000.00716.93
8.0.240.0030.00316.93
8.0.230.0000.00716.93
8.0.220.0100.00016.97
8.0.210.0000.00716.87
8.0.200.0040.00416.95
8.0.190.0030.00517.02
8.0.180.0080.00016.86
8.0.170.0000.00816.89
8.0.160.0040.00417.00
8.0.150.0050.00216.86
8.0.140.0000.00816.81
8.0.130.0000.00513.41
8.0.120.0030.00516.79
8.0.110.0070.00316.84
8.0.100.0000.00716.84
8.0.90.0030.00517.02
8.0.80.0150.00016.95
8.0.70.0000.00716.89
8.0.60.0040.00416.85
8.0.50.0040.00416.98
8.0.30.0080.01117.04
8.0.20.0090.01117.40
8.0.10.0040.00417.04
8.0.00.0110.00616.79
7.4.330.0050.00015.08
7.4.320.0030.00316.52
7.4.300.0030.00316.49
7.4.290.0040.00416.52
7.4.280.0000.00716.55
7.4.270.0030.00316.43
7.4.260.0070.00016.49
7.4.250.0070.00016.57
7.4.240.0020.00516.55
7.4.230.0030.00316.63
7.4.220.0160.00316.63
7.4.210.0040.01116.63
7.4.200.0030.00316.37
7.4.160.0070.00716.62
7.4.150.0070.01017.40
7.4.140.0180.00317.86
7.4.130.0140.00316.51
7.4.120.0110.00916.49
7.4.110.0110.00716.61
7.4.100.0120.00916.48
7.4.90.0070.01316.50
7.4.80.0120.00619.39
7.4.70.0100.00716.59
7.4.60.0030.01216.50
7.4.50.0000.00816.38
7.4.40.0120.00816.55
7.4.30.0100.01016.23
7.4.00.0100.00315.11
7.3.330.0000.00513.29
7.3.320.0050.00013.50
7.3.310.0000.00716.48
7.3.300.0000.00716.43
7.3.290.0060.00916.43
7.3.280.0050.01116.42
7.3.270.0150.00417.40
7.3.260.0030.01516.47
7.3.250.0090.00916.40
7.3.240.0070.01116.50
7.3.230.0090.00916.42
7.3.210.0130.01016.33
7.3.200.0060.01316.45
7.3.190.0140.00516.56
7.3.180.0040.01116.43
7.3.170.0060.01116.54
7.3.160.0030.01416.35
7.3.10.0160.00316.61
7.3.00.0000.01216.86
7.2.330.0090.01316.66
7.2.320.0060.01616.79
7.2.310.0060.01616.38
7.2.300.0170.00016.91
7.2.290.0040.01416.85
7.2.130.0060.00817.04
7.2.120.0000.01016.96
7.2.110.0040.00816.92
7.2.100.0030.00616.80
7.2.90.0100.00716.79
7.2.80.0130.00316.90
7.2.70.0070.00716.93
7.2.60.0020.01116.86
7.2.50.0070.00716.59
7.2.40.0130.01016.88
7.2.30.0070.00416.98
7.2.20.0000.00917.01
7.2.10.0140.00016.82
7.2.00.0010.01118.12
7.1.250.0040.00715.43
7.1.200.0080.00415.80
7.1.100.0070.00717.93
7.1.70.0070.00317.23
7.1.60.0130.01319.29
7.1.50.0090.01216.93
7.1.00.0100.07022.36
7.0.200.0000.00716.65
7.0.60.0070.08719.96
7.0.50.0070.03717.87
7.0.40.0130.08020.24
7.0.30.0300.07720.10
7.0.20.0230.05020.09
7.0.10.0130.06020.06
7.0.00.0170.08020.22
5.6.280.0100.06720.99
5.6.210.0100.06320.61
5.6.200.0030.08718.23
5.6.190.0030.05320.39
5.6.180.0200.08320.46
5.6.170.0300.06320.51
5.6.160.0100.03720.54
5.6.150.0070.05018.21
5.6.140.0070.08718.23
5.6.130.0070.05318.18
5.6.120.0070.07321.20
5.6.110.0170.07020.96
5.6.100.0070.09021.10
5.6.90.0130.05020.98
5.6.80.0130.07020.42
5.5.350.0270.08720.43
5.5.340.0000.06717.95
5.5.330.0030.07320.34
5.5.320.0330.07020.34
5.5.310.0400.07020.23
5.5.300.0130.07717.95
5.5.290.0030.07017.98
5.5.280.0100.04020.89
5.5.270.0070.05320.65
5.5.260.0170.07320.89
5.5.250.0130.04020.61
5.5.240.0000.08020.04
5.4.450.0000.04019.64
5.4.440.0030.03719.48
5.4.430.0070.06319.54
5.4.420.0100.07719.50
5.4.410.0030.06019.14
5.4.400.0030.06719.14
5.4.390.0130.05018.96
5.4.380.0030.05319.23
5.4.370.0030.06719.06
5.4.360.0030.06319.15
5.4.350.0000.07319.13
5.4.340.0030.07718.85
5.4.320.0000.08319.31
5.4.310.0070.07018.98
5.4.300.0030.08019.22
5.4.290.0070.07318.86
5.4.280.0070.06019.23
5.4.270.0030.06319.31
5.4.260.0000.05018.85
5.4.250.0000.05019.16
5.4.240.0070.06018.94
5.4.230.0100.06319.30
5.4.220.0070.07019.15
5.4.210.0030.07719.19
5.4.200.0070.08019.12
5.4.190.0030.05718.96
5.4.180.0100.07018.86
5.4.170.0030.07318.84
5.4.160.0000.07019.23
5.4.150.0030.08019.14
5.4.140.0030.07316.43
5.4.130.0070.07016.43
5.4.120.0000.07716.37
5.4.110.0030.07716.24
5.4.100.0070.06316.50
5.4.90.0000.07316.50
5.4.80.0030.07016.29

preferences:
53.38 ms | 401 KiB | 5 Q