3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { private $proxy; public function __construct(self $proxy = null) { $this->proxy = $proxy ?: $this; } public function getFoo() { extract(['this' => $this->proxy]); echo get_class($this); $f = function () { return $this->foo; }; return $f(); } } class fooProxy extends foo { private $foo; public function __construct($foo) { $this->foo = $foo; parent::__construct($this); } public function __set($name, $value) { echo __FUNCTION__, "\n"; $this->$name = $value; } public function __get($name) { echo __FUNCTION__, "\n"; return $this->$name; } } $p = new foo(new fooProxy(123)); echo $p->getFoo(); echo "\n";

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.0120.00316.88
8.3.50.0210.00016.59
8.3.40.0090.00618.83
8.3.30.0130.00718.89
8.3.20.0000.00820.40
8.3.10.0050.00323.52
8.3.00.0050.00319.56
8.2.180.0120.00916.50
8.2.170.0140.00322.96
8.2.160.0080.00620.52
8.2.150.0030.00724.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0090.00017.75
8.2.110.0070.00319.45
8.2.100.0090.00318.03
8.2.90.0000.00819.17
8.2.80.0040.00417.97
8.2.70.0090.00017.75
8.2.60.0000.00917.80
8.2.50.0060.00618.07
8.2.40.0000.00719.46
8.2.30.0000.00719.85
8.2.20.0050.00217.87
8.2.10.0040.00418.08
8.2.00.0040.00417.99
8.1.280.0130.00325.92
8.1.270.0070.00020.32
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0040.00423.92
8.1.230.0110.00017.42
8.1.220.0080.00017.76
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0040.00417.22
8.1.180.0000.00818.10
8.1.170.0030.00618.48
8.1.160.0040.00422.03
8.1.150.0080.00018.94
8.1.140.0040.00417.46
8.1.130.0000.00717.73
8.1.120.0040.00417.36
8.1.110.0030.00317.36
8.1.100.0040.00417.53
8.1.90.0000.00717.42
8.1.80.0040.00417.46
8.1.70.0000.01117.35
8.1.60.0030.00517.54
8.1.50.0030.00517.58
8.1.40.0040.00417.53
8.1.30.0030.00517.68
8.1.20.0000.00817.48
8.1.10.0060.00317.61
8.1.00.0040.00417.61
8.0.300.0000.00718.77
8.0.290.0000.00816.63
8.0.280.0000.00718.39
8.0.270.0000.00717.13
8.0.260.0030.00317.16
8.0.250.0070.00016.98
8.0.240.0070.00016.89
8.0.230.0040.00416.91
8.0.220.0050.00316.86
8.0.210.0040.00417.02
8.0.200.0060.00017.02
8.0.190.0040.00416.91
8.0.180.0040.00416.97
8.0.170.0040.00416.90
8.0.160.0030.00316.98
8.0.150.0070.00016.78
8.0.140.0000.00716.90
8.0.130.0030.00313.43
8.0.120.0020.00516.96
8.0.110.0070.00016.96
8.0.100.0050.00316.99
8.0.90.0030.00516.84
8.0.80.0150.00016.85
8.0.70.0040.00416.98
8.0.60.0040.00416.81
8.0.50.0040.00416.74
8.0.30.0090.00917.12
8.0.20.0070.01317.40
8.0.10.0070.00017.10
8.0.00.0120.00816.79
7.4.330.0000.00515.15
7.4.320.0000.00816.41
7.4.300.0000.00616.42
7.4.290.0030.00316.50
7.4.280.0030.00516.41
7.4.270.0030.00316.57
7.4.260.0000.00716.55
7.4.250.0040.00416.45
7.4.240.0070.00016.55
7.4.230.0000.00716.40
7.4.220.0070.01616.54
7.4.210.0070.01416.40
7.4.200.0000.00716.54
7.4.160.0060.00916.54
7.4.150.0030.01417.40
7.4.140.0130.00617.86
7.4.130.0030.01616.45
7.4.120.0090.01116.39
7.4.110.0030.01316.75
7.4.100.0120.00616.49
7.4.90.0090.00916.41
7.4.80.0120.00619.39
7.4.70.0100.01316.54
7.4.60.0060.00916.58
7.4.50.0080.00016.61
7.4.40.0090.00916.65
7.4.30.0160.00616.39
7.4.00.0080.00815.18
7.3.330.0000.00513.24
7.3.320.0050.00013.35
7.3.310.0030.00616.51
7.3.300.0000.00616.31
7.3.290.0070.00816.41
7.3.280.0090.00816.39
7.3.270.0120.00617.40
7.3.260.0090.00916.67
7.3.250.0160.00416.46
7.3.240.0130.00316.46
7.3.230.0070.01016.48
7.3.210.0100.00716.77
7.3.200.0160.00016.45
7.3.190.0070.01016.35
7.3.180.0140.00316.43
7.3.170.0150.00616.47
7.3.160.0060.01116.43
7.2.330.0100.00716.72
7.2.320.0030.01716.88
7.2.310.0120.00616.82
7.2.300.0090.01516.62
7.2.290.0120.01216.73
7.2.110.0160.00616.46
7.2.80.0060.00916.88
7.2.60.0170.00016.84
7.2.00.0080.00419.69
7.1.200.0100.00015.92
7.1.100.0110.00017.97
7.1.70.0000.00717.26
7.1.60.0070.01820.03
7.1.50.0040.01816.83
7.1.00.0130.06322.46
7.0.200.0180.00714.71
7.0.60.0030.08019.86
7.0.50.0070.08017.84
7.0.40.0000.04720.19
7.0.30.0330.06720.09
7.0.20.0270.07720.23
7.0.10.0230.08020.15
7.0.00.0130.07320.22
5.6.280.0030.06020.92
5.6.210.0130.08020.72
5.6.200.0100.03318.29
5.6.190.0030.06720.46
5.6.180.0030.04020.75
5.6.170.0270.06320.54
5.6.160.0170.03320.51
5.6.150.0130.03018.21
5.6.140.0100.07318.28
5.6.130.0130.04718.14
5.6.120.0070.04020.98
5.6.110.0000.04721.14
5.6.100.0130.06321.12
5.6.90.0130.08020.99
5.6.80.0070.07320.52
5.6.70.0330.07320.54
5.5.350.0000.07720.34
5.5.340.0070.08317.95
5.5.330.0130.07720.21
5.5.320.0330.08320.23
5.5.310.0300.07720.28
5.5.300.0030.04017.95
5.5.290.0100.07717.95
5.5.280.0170.04720.99
5.5.270.0100.06320.66
5.5.260.0070.08320.85
5.5.250.0070.06720.79
5.5.240.0070.08020.17
5.4.450.0670.07019.34
5.4.440.0800.04019.60
5.4.430.0600.05719.58
5.4.420.0670.06719.36
5.4.410.0630.05719.23
5.4.400.0630.05318.85
5.4.390.0570.06019.27
5.4.380.0470.05319.09
5.4.370.0530.07019.10
5.4.360.0700.05019.10
5.4.350.0630.05319.13
5.4.340.0700.05719.27
5.4.320.0600.06319.24
5.4.310.0530.06318.84
5.4.300.0670.04719.26
5.4.290.0730.04018.94
5.4.280.0600.05319.26
5.4.270.0630.06019.24
5.4.260.0700.04718.86
5.4.250.0530.05319.23
5.4.240.0730.05319.27
5.4.230.0630.05019.36
5.4.220.0700.04718.84
5.4.210.0730.05719.27
5.4.200.0570.04319.09
5.4.190.0600.05019.27
5.4.180.0700.04319.11
5.4.170.0700.05018.82
5.4.160.0470.05719.22
5.4.150.0570.04719.10
5.4.140.0570.06016.34
5.4.130.0500.06016.34
5.4.120.0730.03716.41
5.4.110.0570.05316.48
5.4.100.0500.05316.59
5.4.90.0600.04716.66
5.4.80.0800.03316.61
5.4.70.0130.06316.55
5.4.60.0030.07016.54
5.4.50.0000.06716.52
5.4.40.0000.07316.55
5.4.30.0230.07316.54
5.4.20.0330.04716.38
5.4.10.0030.06016.51

preferences:
61.41 ms | 400 KiB | 5 Q