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['foo']); 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.0170.00318.31
8.3.50.0110.00821.93
8.3.40.0080.00618.76
8.3.30.0040.01118.73
8.3.20.0040.00420.41
8.3.10.0000.00821.73
8.3.00.0040.00420.07
8.2.180.0110.01118.31
8.2.170.0070.01122.96
8.2.160.0100.00720.53
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0030.00617.38
8.2.110.0070.00422.28
8.2.100.0110.00017.80
8.2.90.0050.00318.99
8.2.80.0040.00417.97
8.2.70.0050.00317.38
8.2.60.0000.00817.91
8.2.50.0030.00518.07
8.2.40.0030.00919.33
8.2.30.0000.00722.41
8.2.20.0030.00517.48
8.2.10.0000.00817.93
8.2.00.0040.00417.80
8.1.280.0040.01125.92
8.1.270.0130.00324.02
8.1.260.0100.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00422.45
8.1.230.0040.00719.30
8.1.220.0030.00617.74
8.1.210.0090.00018.77
8.1.200.0100.00017.10
8.1.190.0030.00517.00
8.1.180.0050.00318.10
8.1.170.0040.00418.46
8.1.160.0070.00021.88
8.1.150.0040.00418.81
8.1.140.0030.00517.27
8.1.130.0000.00717.60
8.1.120.0050.00217.29
8.1.110.0050.00317.29
8.1.100.0070.00017.27
8.1.90.0040.00417.29
8.1.80.0000.00717.20
8.1.70.0030.00317.17
8.1.60.0030.00617.36
8.1.50.0000.00717.42
8.1.40.0080.00017.26
8.1.30.0000.00817.39
8.1.20.0040.00417.41
8.1.10.0060.00317.28
8.1.00.0040.00417.20
8.0.300.0060.00318.84
8.0.290.0040.00416.75
8.0.280.0040.00418.31
8.0.270.0040.00417.04
8.0.260.0000.00617.00
8.0.250.0000.00816.95
8.0.240.0080.00016.86
8.0.230.0080.00016.98
8.0.220.0000.00716.88
8.0.210.0020.00516.79
8.0.200.0050.00316.88
8.0.190.0030.00616.91
8.0.180.0040.00416.70
8.0.170.0000.00816.81
8.0.160.0000.00816.82
8.0.150.0000.00716.76
8.0.140.0000.00716.77
8.0.130.0050.00013.30
8.0.120.0060.00316.67
8.0.110.0000.00716.85
8.0.100.0070.00016.84
8.0.90.0050.00216.79
8.0.80.0100.01116.78
8.0.70.0020.00516.86
8.0.60.0000.00716.80
8.0.50.0050.00216.81
8.0.30.0120.00716.86
8.0.20.0130.00917.40
8.0.10.0050.00316.79
8.0.00.0070.01116.62
7.4.330.0000.00515.08
7.4.320.0000.00616.35
7.4.300.0030.00316.41
7.4.290.0030.00316.47
7.4.280.0060.00316.26
7.4.270.0030.00316.30
7.4.260.0070.00016.43
7.4.250.0040.00416.38
7.4.240.0020.00516.49
7.4.230.0030.00316.48
7.4.220.0030.01516.32
7.4.210.0120.00916.31
7.4.200.0000.00716.23
7.4.160.0060.01016.48
7.4.150.0070.01017.40
7.4.140.0070.01217.86
7.4.130.0070.01416.44
7.4.120.0080.00916.48
7.4.110.0090.00916.23
7.4.100.0180.00616.45
7.4.90.0080.00916.38
7.4.80.0110.00719.39
7.4.70.0100.00716.45
7.4.60.0080.00816.36
7.4.50.0030.00316.13
7.4.40.0090.01216.48
7.4.30.0030.01416.43
7.4.00.0070.01114.62
7.3.330.0000.00513.09
7.3.320.0060.00013.05
7.3.310.0030.00316.05
7.3.300.0030.00316.10
7.3.290.0090.00616.24
7.3.280.0090.00816.26
7.3.270.0160.00317.40
7.3.260.0150.00616.25
7.3.250.0110.00816.32
7.3.240.0080.00916.44
7.3.230.0130.00316.49
7.3.210.0060.01016.43
7.3.200.0070.01016.16
7.3.190.0110.00616.25
7.3.180.0060.00916.26
7.3.170.0060.01116.43
7.3.160.0100.00616.48
7.3.120.0090.00614.73
7.3.110.0100.00714.71
7.3.100.0030.01014.67
7.3.90.0030.01014.50
7.3.80.0040.01114.36
7.3.70.0060.00914.66
7.3.60.0070.00714.43
7.3.50.0000.01014.87
7.3.40.0130.00314.55
7.3.30.0070.01014.69
7.3.20.0070.01016.55
7.3.10.0060.00316.37
7.3.00.0120.00316.50
7.2.330.0130.00316.54
7.2.320.0070.01016.36
7.2.310.0130.00916.53
7.2.300.0170.00016.48
7.2.290.0030.01416.21
7.2.250.0030.01514.60
7.2.240.0100.01014.68
7.2.230.0110.00714.97
7.2.220.0090.00614.73
7.2.210.0090.00614.73
7.2.200.0070.00714.66
7.2.190.0030.01014.53
7.2.180.0030.00715.03
7.2.170.0070.00714.88
7.2.60.0040.01116.32
7.2.00.0000.01219.25
7.1.330.0000.01415.68
7.1.320.0060.00615.32
7.1.310.0000.01215.42
7.1.300.0100.00015.56
7.1.290.0040.01415.52
7.1.280.0080.00715.33
7.1.270.0070.00715.66
7.1.260.0080.00315.65
7.1.200.0060.00315.64
7.1.100.0030.00917.56
7.1.70.0030.00316.98
7.1.60.0070.01419.14
7.1.50.0240.00334.68
7.1.00.0030.07722.46
7.0.200.0000.00716.88
7.0.60.0030.04019.98
7.0.50.0070.06017.89
7.0.40.0100.06720.11
7.0.30.0300.06720.19
7.0.20.0300.04720.25
7.0.10.0130.08020.09
7.0.00.0100.08020.25
5.6.280.0030.03021.05
5.6.210.0130.07720.63
5.6.200.0070.08018.28
5.6.190.0070.05720.61
5.6.180.0300.07320.41
5.6.170.0530.06320.39
5.6.160.0100.08720.49
5.6.150.0070.05018.14
5.6.140.0100.07018.18
5.6.130.0070.04018.13
5.6.120.0000.04320.91
5.6.110.0100.08021.05
5.6.100.0030.08720.98
5.6.90.0130.07020.89
5.6.80.0300.06320.29
5.5.350.0030.06020.46
5.5.340.0070.04017.95
5.5.330.0070.04320.31
5.5.320.3870.03320.52
5.5.310.0300.07320.23
5.5.300.0100.07717.98
5.5.290.0000.05317.97
5.5.280.0100.06720.93
5.5.270.0000.05320.79
5.5.260.0000.08020.80
5.5.250.0100.07320.71
5.5.240.0070.06720.15
5.4.450.0730.05319.15
5.4.440.0730.06019.53
5.4.430.0870.06719.57
5.4.420.0800.04319.25
5.4.410.0800.05019.41
5.4.400.0800.04319.27
5.4.390.0900.04018.84
5.4.380.0670.05319.08
5.4.370.0670.05019.30
5.4.360.0730.05718.82
5.4.350.0770.04319.23
5.4.340.0630.05319.09
5.4.320.0900.05319.30
5.4.310.0830.06018.92
5.4.300.0930.05719.03
5.4.290.0630.05319.20
5.4.280.0670.05319.09
5.4.270.0800.05719.07
5.4.260.0670.05019.20
5.4.250.0700.05319.23
5.4.240.0700.05019.22
5.4.230.0700.05019.19
5.4.220.0630.05319.25
5.4.210.0700.05019.18
5.4.200.0930.05719.29
5.4.190.0770.04319.05
5.4.180.0700.05719.17
5.4.170.0930.06019.19
5.4.160.0730.04319.19
5.4.150.0670.05718.80
5.4.140.0700.06016.43
5.4.130.0700.05316.54
5.4.120.0670.06016.41
5.4.110.0600.05716.46
5.4.100.0600.05316.45
5.4.90.0700.04316.28
5.4.80.0670.04716.47
5.4.70.0230.06716.43
5.4.60.0070.07016.25
5.4.50.0000.05716.56
5.4.40.0300.04316.35
5.4.30.0270.07016.48
5.4.20.0070.03316.50

preferences:
55.6 ms | 401 KiB | 5 Q