3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $b; public function __construct($b) { $this->b = $b; } public function methodA() { return $this->b; } } class ProxyA extends A { private $proxied; public function methodA() { return $this->proxied->methodA(); } public function methodB() { return true; } public static function makeProxy(A $instance) { $rc = new \ReflectionClass(get_class($instance)); $proxy = $rc->newInstanceWithoutConstructor(); $proxy->proxied = $instance; return $proxy; } } var_dump(ProxyA::makeProxy(new A(1234))->methodB());

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.0210.00016.88
8.3.50.0320.00621.22
8.3.40.0040.01119.02
8.3.30.0000.01418.82
8.3.20.0000.00720.34
8.3.10.0080.00023.53
8.3.00.0050.00318.04
8.2.180.0070.01118.41
8.2.170.0090.00622.96
8.2.160.0110.00420.52
8.2.150.0030.00524.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00817.75
8.2.110.0080.00322.16
8.2.100.0030.00917.93
8.2.90.0000.00818.97
8.2.80.0080.00017.97
8.2.70.0040.00417.63
8.2.60.0090.00017.93
8.2.50.0040.00418.07
8.2.40.0040.00420.94
8.2.30.0000.00820.67
8.2.20.0000.00717.70
8.2.10.0040.00417.88
8.2.00.0040.00417.94
8.1.280.0110.01125.92
8.1.270.0150.00423.89
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00622.55
8.1.230.0080.00420.91
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0060.00317.23
8.1.190.0000.00817.25
8.1.180.0030.00518.10
8.1.170.0030.00620.28
8.1.160.0000.00721.95
8.1.150.0070.00018.87
8.1.140.0050.00319.71
8.1.130.0000.00817.64
8.1.120.0000.00817.28
8.1.110.0080.00017.42
8.1.100.0000.00717.40
8.1.90.0000.00717.39
8.1.80.0000.00717.32
8.1.70.0040.00417.32
8.1.60.0040.00417.57
8.1.50.0040.00417.50
8.1.40.0050.00217.43
8.1.30.0040.00417.60
8.1.20.0040.00417.56
8.1.10.0040.00417.59
8.1.00.0050.00217.57
8.0.300.0050.00318.77
8.0.290.0040.00416.63
8.0.280.0030.00318.26
8.0.270.0030.00517.20
8.0.260.0030.00317.14
8.0.250.0040.00417.01
8.0.240.0000.00716.98
8.0.230.0040.00416.86
8.0.220.0070.00016.94
8.0.210.0040.00416.89
8.0.200.0000.00617.00
8.0.190.0030.00616.85
8.0.180.0000.00816.91
8.0.170.0000.00716.93
8.0.160.0000.00716.82
8.0.150.0030.00316.79
8.0.140.0070.00016.86
8.0.130.0000.00613.37
8.0.120.0060.00316.84
8.0.110.0000.00816.91
8.0.100.0030.00516.79
8.0.90.0000.00716.74
8.0.80.0040.01116.86
8.0.70.0000.00716.70
8.0.60.0000.00816.70
8.0.50.0050.00317.00
8.0.30.0130.00917.20
8.0.20.0130.01117.40
8.0.10.0020.00516.84
8.0.00.0110.00816.74
7.4.330.0050.00015.08
7.4.320.0000.00716.34
7.4.300.0000.00816.66
7.4.290.0070.00016.52
7.4.280.0070.00016.49
7.4.270.0070.00016.54
7.4.260.0030.00316.59
7.4.250.0000.00816.50
7.4.240.0040.00316.45
7.4.230.0040.00416.62
7.4.220.0040.01516.72
7.4.210.0070.00716.55
7.4.200.0060.00016.36
7.4.160.0120.00316.60
7.4.150.0060.01617.40
7.4.140.0090.01117.86
7.4.130.0110.00716.63
7.4.120.0080.01216.52
7.4.110.0040.01816.58
7.4.100.0090.00816.49
7.4.90.0060.01216.55
7.4.80.0090.00919.39
7.4.70.0090.01216.49
7.4.60.0160.00016.52
7.4.50.0030.00316.76
7.4.40.0060.01016.22
7.4.30.0170.00716.47
7.4.00.0040.00815.05
7.3.330.0000.00613.35
7.3.320.0060.00013.25
7.3.310.0030.00316.29
7.3.300.0030.00316.45
7.3.290.0020.01516.42
7.3.280.0080.00816.43
7.3.270.0120.00617.40
7.3.260.0090.00916.68
7.3.240.0090.01116.46
7.3.230.0030.01316.65
7.3.210.0120.00616.72
7.3.200.0100.00616.37
7.3.190.0100.00716.55
7.3.180.0060.01016.38
7.3.170.0030.02116.52
7.3.160.0100.00716.43
7.2.330.0150.00316.45
7.2.320.0060.01216.67
7.2.310.0100.00716.65
7.2.300.0040.01216.66
7.2.290.0040.01716.76
7.2.60.0000.01416.70
7.2.00.0210.01419.37
7.1.200.0030.00715.82
7.1.100.0000.00917.83
7.1.70.0110.00717.30
7.1.60.0100.01319.50
7.1.50.0060.01616.84
7.1.00.0070.07322.37
7.0.200.0550.00014.44
7.0.60.0000.08720.03
7.0.50.0070.07317.86
7.0.40.0100.08020.27
7.0.30.0300.04020.33
7.0.20.0300.07320.05
7.0.10.0030.07020.16
7.0.00.0100.06720.24
5.6.280.0030.04021.13
5.6.210.0170.07320.52
5.6.200.0030.06018.30
5.6.190.0070.06720.67
5.6.180.0030.04320.59
5.6.170.0200.07320.56
5.6.160.0100.06720.56
5.6.150.0030.08318.19
5.6.140.0000.04318.19
5.6.130.0130.05718.16
5.6.120.0100.08021.13
5.6.110.0030.08721.01
5.6.100.0100.07021.00
5.6.90.0100.08320.96
5.6.80.0100.07320.45
5.5.350.0070.07720.45
5.5.340.0230.04718.07
5.5.330.0070.07320.19
5.5.320.0200.08320.24
5.5.310.0330.06020.24
5.5.300.0030.04017.97
5.5.290.0130.04717.98
5.5.280.0000.05320.89
5.5.270.0170.07320.80
5.5.260.0030.09020.95
5.5.250.0030.04320.70
5.5.240.0170.06320.20
5.4.450.0830.05319.59
5.4.440.0770.05719.55
5.4.430.0700.06019.58
5.4.420.0630.06319.47
5.4.410.0900.04719.34
5.4.400.0900.04719.27
5.4.390.0930.04319.29
5.4.380.0700.07019.01
5.4.370.0670.06019.26
5.4.360.0700.05719.16
5.4.350.1000.04719.29
5.4.340.0930.04319.26
5.4.320.1000.05719.23
5.4.310.0730.05319.08
5.4.300.0700.05319.30
5.4.290.0870.04719.37
5.4.280.0700.05719.28
5.4.270.0700.05319.37
5.4.260.0700.05018.87
5.4.250.0730.05019.25
5.4.240.0670.06719.27
5.4.230.0870.04719.01
5.4.220.0730.05019.14
5.4.210.0730.05019.30
5.4.200.0700.05318.86
5.4.190.0770.05318.85
5.4.180.0700.05319.27
5.4.170.0770.05019.24
5.4.160.0830.06718.78
5.4.150.0800.04318.95
5.4.140.0700.05316.57
5.4.130.0830.05016.73
5.4.120.0800.05016.46
5.4.110.0700.05316.57
5.4.100.0730.05016.69
5.4.90.1000.05016.70
5.4.80.0830.06016.55
5.4.70.0000.04716.60
5.4.60.0070.07316.35
5.4.50.0100.06716.53
5.4.40.0130.06016.33
5.4.30.0200.04316.42
5.4.20.0170.04016.39

preferences:
51.58 ms | 401 KiB | 5 Q