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();

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.0060.01216.75
8.3.50.0110.00416.48
8.3.40.0120.00319.00
8.3.30.0070.00718.72
8.3.20.0050.00320.09
8.3.10.0050.00221.89
8.3.00.0040.00420.16
8.2.180.0110.00716.63
8.2.170.0110.00422.96
8.2.160.0070.00720.46
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00617.63
8.2.110.0060.00322.16
8.2.100.0090.00317.63
8.2.90.0040.00419.22
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0040.00418.03
8.2.50.0030.00818.07
8.2.40.0040.00419.38
8.2.30.0060.00320.57
8.2.20.0040.00417.78
8.2.10.0070.00017.99
8.2.00.0000.00718.08
8.1.280.0120.00325.92
8.1.270.0100.00723.97
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00024.01
8.1.230.0090.00317.48
8.1.220.0080.00017.79
8.1.210.0000.00818.77
8.1.200.0030.00717.35
8.1.190.0040.00417.47
8.1.180.0000.00718.10
8.1.170.0060.00318.64
8.1.160.0040.00421.92
8.1.150.0060.00318.80
8.1.140.0040.00417.49
8.1.130.0000.00717.75
8.1.120.0000.01017.45
8.1.110.0000.00717.32
8.1.100.0030.00517.45
8.1.90.0040.00417.39
8.1.80.0000.00917.47
8.1.70.0030.00317.44
8.1.60.0070.00017.61
8.1.50.0000.00817.51
8.1.40.0050.00317.57
8.1.30.0040.00417.57
8.1.20.0030.00617.57
8.1.10.0000.00817.48
8.1.00.0040.00417.46
8.0.300.0000.00718.77
8.0.290.0050.00316.63
8.0.280.0070.00018.45
8.0.270.0070.00017.21
8.0.260.0000.00717.18
8.0.250.0080.00017.01
8.0.240.0000.00717.01
8.0.230.0030.00316.91
8.0.220.0030.00616.86
8.0.210.0080.00016.96
8.0.200.0030.00616.99
8.0.190.0060.00316.88
8.0.180.0000.00816.96
8.0.170.0030.00617.05
8.0.160.0000.00816.91
8.0.150.0000.00716.91
8.0.140.0040.00416.81
8.0.130.0060.00013.45
8.0.120.0000.00816.89
8.0.110.0080.00016.97
8.0.100.0050.00216.83
8.0.90.0030.00516.89
8.0.80.0000.01516.90
8.0.70.0000.00716.93
8.0.60.0040.00416.73
8.0.50.0040.00416.77
8.0.30.0080.01117.25
8.0.20.0100.00917.40
8.0.10.0000.00716.95
8.0.00.0080.00916.77
7.4.330.0030.00315.08
7.4.320.0030.00316.50
7.4.300.0060.00016.63
7.4.290.0040.00416.48
7.4.280.0040.00416.56
7.4.270.0000.00716.63
7.4.260.0030.00316.45
7.4.250.0070.00016.55
7.4.240.0050.00316.63
7.4.230.0000.00716.54
7.4.220.0060.01116.51
7.4.210.0040.01616.70
7.4.200.0000.00716.70
7.4.160.0090.00616.73
7.4.150.0040.01417.40
7.4.140.0130.00417.86
7.4.130.0120.00616.57
7.4.120.0070.01016.37
7.4.110.0150.00316.45
7.4.100.0090.00916.52
7.4.90.0150.00616.53
7.4.80.0080.00819.39
7.4.70.0040.01416.35
7.4.60.0060.01216.54
7.4.50.0030.00516.21
7.4.40.0140.00616.55
7.4.30.0030.01416.50
7.4.00.0090.00314.89
7.3.330.0000.00513.36
7.3.320.0000.00513.27
7.3.310.0000.00716.48
7.3.300.0040.00416.31
7.3.290.0080.00616.40
7.3.280.0050.01016.43
7.3.270.0140.00317.40
7.3.260.0070.01016.57
7.3.250.0110.01016.45
7.3.240.0060.01016.41
7.3.230.0070.01016.59
7.3.210.0080.00816.44
7.3.200.0060.01216.48
7.3.190.0100.00716.52
7.3.180.0090.00616.50
7.3.170.0030.01416.44
7.3.160.0100.00616.71
7.2.330.0160.00616.73
7.2.320.0100.01316.36
7.2.310.0160.00016.76
7.2.300.0070.01016.73
7.2.290.0070.01316.37
7.2.60.0070.00716.72
7.2.00.0060.00619.27
7.1.200.0160.00315.58
7.1.100.0040.01118.01
7.1.70.0030.01317.23
7.1.60.0040.01919.29
7.1.50.0110.00717.06
7.1.00.0070.07322.54
7.0.200.0040.00416.75
7.0.60.0130.07319.91
7.0.50.0130.07717.97
7.0.40.0030.07320.24
7.0.30.0400.07020.25
7.0.20.0370.07020.10
7.0.10.0070.08720.15
7.0.00.0070.05020.32
5.6.280.0030.06020.89
5.6.210.0100.06720.71
5.6.200.0070.08318.19
5.6.190.0070.09020.39
5.6.180.0300.04320.67
5.6.170.0170.04020.47
5.6.160.0100.04720.55
5.6.150.0130.07718.23
5.6.140.0030.04018.17
5.6.130.0130.03318.24
5.6.120.0130.06021.02
5.6.110.0100.08020.95
5.6.100.0070.07321.09
5.6.90.0030.08721.12
5.6.80.0030.07020.37
5.5.350.0300.07320.41
5.5.340.0030.06317.98
5.5.330.0070.04320.27
5.5.320.0170.04020.29
5.5.310.0270.04720.34
5.5.300.0100.07717.95
5.5.290.0070.04717.97
5.5.280.0070.05320.89
5.5.270.0030.09020.84
5.5.260.0100.06720.93
5.5.250.0170.06720.54
5.5.240.0030.04320.03
5.4.450.1000.05019.60
5.4.440.0900.06019.28
5.4.430.0830.06019.37
5.4.420.0800.05719.62
5.4.410.1000.07319.03
5.4.400.1170.06318.98
5.4.390.0970.06719.13
5.4.380.0670.07019.27
5.4.370.0200.06319.02
5.4.360.0300.06019.28
5.4.350.0830.05719.14
5.4.340.0830.06319.14
5.4.320.0630.06019.24
5.4.310.0130.05019.38
5.4.300.0170.04719.00
5.4.290.0400.06019.25
5.4.280.0670.06319.14
5.4.270.0630.04019.36
5.4.260.0070.05318.86
5.4.250.0330.05019.36
5.4.240.0700.05319.21
5.4.230.0530.05318.85
5.4.220.0870.04319.27
5.4.210.0870.06019.13
5.4.200.0730.05319.21
5.4.190.0830.05719.13
5.4.180.0800.06319.27
5.4.170.1070.06319.11
5.4.160.0870.05318.84
5.4.150.0900.06318.81
5.4.140.0800.05316.47
5.4.130.0900.04716.50
5.4.120.0730.06016.55
5.4.110.0770.05716.47
5.4.100.0800.05316.61
5.4.90.0970.04316.70
5.4.80.0970.05016.45
5.4.70.0000.03716.49
5.4.60.0130.03316.38
5.4.50.0270.06716.25
5.4.40.0300.04716.55
5.4.30.0000.07316.48
5.4.20.0000.07316.44
5.4.10.0130.04316.51

preferences:
47.48 ms | 400 KiB | 5 Q