3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); $var = new StdClass(); $var->foo = 'bar'; //$this = $var; // PHP Fatal error: Cannot re-assign $this $GLOBALS['this'] = $var; var_dump($this); $var->foo = 'baz'; $foo = 'this'; $$foo = $var; var_dump($this); foo($this); function foo($this){ //global $this; // PHP Fatal error: Cannot re-assign $this // $this = $GLOBALS['var']; // PHP Fatal error: Cannot re-assign $this var_dump($this); $GLOBALS['this']->foo = 'baw'; $$GLOBALS['foo'] = $GLOBALS['this']; var_dump($$GLOBALS); var_dump($this); }

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.0110.01118.10
8.3.50.0120.00921.07
8.3.40.0040.01118.81
8.3.30.0030.01218.67
8.3.20.0050.00320.34
8.3.10.0050.00321.90
8.3.00.0040.00420.15
8.2.180.0140.00718.36
8.2.170.0100.01022.96
8.2.160.0100.00720.43
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0000.00817.50
8.2.110.0060.00622.20
8.2.100.0110.00017.80
8.2.90.0020.00518.96
8.2.80.0080.00017.97
8.2.70.0030.00617.50
8.2.60.0030.00617.67
8.2.50.0030.00618.07
8.2.40.0000.01219.16
8.2.30.0040.00422.29
8.2.20.0060.00317.55
8.2.10.0000.00717.92
8.2.00.0040.00417.90
8.1.280.0070.00725.92
8.1.270.0100.01023.91
8.1.260.0070.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00622.48
8.1.230.0110.00019.19
8.1.220.0070.00017.74
8.1.210.0050.00318.77
8.1.200.0030.00617.10
8.1.190.0040.00417.23
8.1.180.0070.00018.10
8.1.170.0000.00918.41
8.1.160.0000.00721.84
8.1.150.0000.00718.75
8.1.140.0040.00417.32
8.1.130.0070.00017.47
8.1.120.0040.00417.34
8.1.110.0000.00717.29
8.1.100.0000.00717.38
8.1.90.0000.00717.36
8.1.80.0040.00417.35
8.1.70.0000.00717.18
8.1.60.0000.00817.39
8.1.50.0040.00417.26
8.1.40.0030.00517.27
8.1.30.0060.00317.55
8.1.20.0040.00417.54
8.1.10.0000.00717.39
8.1.00.0000.00817.24
8.0.300.0030.00518.77
8.0.290.0070.00016.63
8.0.280.0030.00318.31
8.0.270.0030.00317.04
8.0.260.0030.00317.16
8.0.250.0000.00716.92
8.0.240.0000.00716.88
8.0.230.0000.00716.84
8.0.220.0000.00716.84
8.0.210.0040.00416.86
8.0.200.0050.00316.84
8.0.190.0040.00816.86
8.0.180.0050.00316.82
8.0.170.0000.00716.76
8.0.160.0000.00816.69
8.0.150.0040.00416.78
8.0.140.0040.00416.66
8.0.130.0030.00613.30
8.0.120.0000.00716.69
8.0.110.0050.00316.79
8.0.100.0060.00316.77
8.0.90.0070.00016.82
8.0.80.0000.01516.71
8.0.70.0000.00816.86
8.0.60.0070.00016.84
8.0.50.0000.00816.93
8.0.30.0080.01217.00
8.0.20.0110.00717.40
8.0.10.0050.00316.88
8.0.00.0120.00616.65
7.4.330.0050.00015.08
7.4.320.0030.00316.47
7.4.300.0030.00316.27
7.4.290.0040.00416.46
7.4.280.0030.00516.43
7.4.270.0000.00716.42
7.4.260.0030.00316.38
7.4.250.0000.00816.35
7.4.240.0040.00316.33
7.4.230.0030.00316.54
7.4.220.0070.01016.53
7.4.210.0100.01016.50
7.4.200.0030.00516.44
7.4.160.0110.00616.38
7.4.150.0130.00917.40
7.4.140.0110.00817.86
7.4.130.0090.01216.36
7.4.120.0100.00816.37
7.4.110.0100.01316.38
7.4.100.0100.01016.36
7.4.90.0060.01016.46
7.4.80.0130.00419.39
7.4.70.0110.00616.36
7.4.60.0090.00616.41
7.4.50.0030.00316.43
7.4.40.0070.01416.17
7.4.30.0100.00716.26
7.4.00.0040.01214.61
7.3.330.0000.00513.23
7.3.320.0030.00313.32
7.3.310.0000.00716.10
7.3.300.0070.00016.11
7.3.290.0120.00416.22
7.3.280.0100.00816.22
7.3.270.0070.01017.40
7.3.260.0100.00716.25
7.3.250.0070.01016.28
7.3.240.0060.01516.21
7.3.230.0120.01216.39
7.3.210.0110.00516.28
7.3.200.0140.00316.37
7.3.190.0060.00916.37
7.3.180.0110.00416.22
7.3.170.0090.00916.33
7.3.160.0140.00416.32
7.3.120.0060.01314.75
7.3.110.0040.01114.80
7.3.100.0050.00814.56
7.3.90.0060.00314.63
7.3.80.0050.00514.72
7.3.70.0030.01014.66
7.3.60.0000.01014.56
7.3.50.0000.01114.65
7.3.40.0100.00014.48
7.3.30.0040.01114.22
7.3.20.0030.00616.35
7.3.10.0060.00916.50
7.3.00.0100.00316.48
7.2.330.0090.00916.41
7.2.320.0060.01016.18
7.2.310.0090.00916.38
7.2.300.0000.01616.34
7.2.290.0040.01316.20
7.2.250.0070.01114.95
7.2.240.0000.01614.70
7.2.230.0070.00714.67
7.2.220.0080.00414.97
7.2.210.0070.00714.74
7.2.200.0060.00914.90
7.2.190.0060.00914.76
7.2.180.0040.00714.77
7.2.170.0030.01214.93
7.2.130.0070.00716.75
7.2.120.0090.00316.74
7.2.110.0000.01416.85
7.2.100.0040.00716.68
7.2.90.0080.00316.60
7.2.80.0130.00316.82
7.2.70.0030.00716.83
7.2.60.0080.00716.73
7.2.50.0070.00716.56
7.2.40.0040.00416.66
7.2.30.0050.00516.64
7.2.20.0040.01116.64
7.2.10.0060.00616.63
7.2.00.0050.01217.98
7.1.330.0130.00315.51
7.1.320.0060.00915.71
7.1.310.0070.00715.40
7.1.300.0040.00415.73
7.1.290.0000.00815.17
7.1.280.0030.01015.49
7.1.270.0030.00615.75
7.1.260.0040.01115.40
7.1.250.0000.00915.30
7.1.200.0130.00315.46
7.1.100.0060.00617.81
7.1.70.0050.00316.95
7.1.60.0100.01319.14
7.1.50.0200.02034.34
7.1.00.0130.06722.42
7.0.200.0040.00416.84
7.0.120.0000.05022.02
7.0.110.0030.04021.95
7.0.100.0000.03321.96
7.0.90.0000.07021.93
7.0.80.0070.03322.02
7.0.70.0130.05721.97
7.0.60.0070.03721.95
7.0.50.0070.07722.14
7.0.40.0000.05720.13
7.0.30.0070.07320.02
7.0.20.0070.05020.01
7.0.10.0070.06020.16
7.0.00.0000.05019.89
5.6.280.0000.03321.07
5.6.270.0070.04320.75
5.6.260.0030.03720.93
5.6.250.0030.03720.82
5.6.240.0000.08020.76
5.6.230.0070.04720.93
5.6.220.0030.06021.04
5.6.210.0000.06720.97
5.6.200.0030.06320.79
5.6.190.0070.07720.70
5.6.180.0100.06020.88
5.6.170.0030.08020.80
5.6.160.0070.04320.99
5.6.150.0000.05320.96
5.6.140.0070.04320.99
5.6.130.0030.04020.96
5.6.120.0030.03721.03
5.6.110.0000.05720.98
5.6.100.0000.07020.87
5.6.90.0100.07320.94
5.6.80.0030.03720.41
5.6.70.0030.04020.27
5.6.60.0070.06720.41
5.6.50.0030.03720.19
5.6.40.0000.06720.23
5.6.30.0030.07020.06
5.6.20.0000.04020.14
5.6.10.0130.07020.35
5.6.00.0100.07720.12
5.5.380.0070.07317.70
5.5.370.0070.06717.68
5.5.360.0030.07017.58
5.5.350.0000.07717.49
5.5.340.0030.05717.95
5.5.330.0000.04718.22
5.5.320.0000.08317.93
5.5.310.0070.07317.93
5.5.300.0030.03718.14
5.5.290.0000.05718.09
5.5.280.0130.07018.22
5.5.270.0100.06318.11
5.5.260.0070.06318.05
5.5.250.0130.07018.04
5.5.240.0000.07017.61
5.5.230.0030.04317.48
5.5.220.0000.07717.29
5.5.210.0100.03317.29
5.5.200.0030.03317.43
5.5.190.0000.05717.58
5.5.180.0000.04017.29
5.5.160.0070.04717.44
5.5.150.0030.06317.28
5.5.140.0000.07717.48
5.5.130.0000.07717.46
5.5.120.0070.07317.45
5.5.110.0030.04317.27
5.5.100.0030.04317.33
5.5.90.0100.06717.35
5.5.80.0130.06717.20
5.5.70.0030.04017.29
5.5.60.0100.07017.34
5.5.50.0070.06317.15
5.5.40.0030.07717.47
5.5.30.0000.07017.48
5.5.20.0030.06717.17
5.5.10.0030.04717.14
5.5.00.0000.04017.45
5.4.450.0030.04019.36
5.4.440.0000.04019.28
5.4.430.0030.07319.20
5.4.420.0030.05719.40
5.4.410.0000.06319.08
5.4.400.0070.06018.93
5.4.390.0070.06018.93
5.4.380.0070.06719.08
5.4.370.0030.06019.25
5.4.360.0030.07319.25
5.4.350.0030.06319.09
5.4.340.0000.04718.95
5.4.320.0070.06319.09
5.4.310.0030.07319.10
5.4.300.0030.07018.96
5.4.290.0030.06719.12
5.4.280.0070.05019.10
5.4.270.0000.05319.25
5.4.260.0030.04718.92
5.4.250.0070.04019.09
5.4.240.0030.07319.07
5.4.230.0100.07018.94
5.4.220.0030.06019.11
5.4.210.0130.06019.11
5.4.200.0030.07318.88
5.4.190.0000.07718.94
5.4.180.0030.07319.09
5.4.170.0000.06319.09
5.4.160.0000.06719.16
5.4.150.0030.04018.91
5.4.140.0000.07716.28
5.4.130.0070.05716.27
5.4.120.0000.03716.32
5.4.110.0030.06316.43
5.4.100.0070.03716.30
5.4.90.0070.05316.36
5.4.80.0100.06316.28
5.4.70.0030.05716.40
5.4.60.0070.02716.34
5.4.50.0000.05316.38
5.4.40.0030.05016.55
5.4.30.0030.06016.38
5.4.20.0000.04316.34
5.4.10.0100.06316.32
5.4.00.0000.07315.73

preferences:
47.95 ms | 401 KiB | 5 Q