3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $foo; private function __construct($spam){ $this->foo = $spam; } public function getFoo() { return $this->foo; } } $args = 'bacon'; $class = 'Foo'; $reflClass = new \ReflectionClass($class); $instance = call_user_func(\Closure::bind(function () use ($args) { return new static(...$args); }, $reflClass->newInstanceWithoutConstructor(), $class)); echo $instance->getFoo();

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.0070.01018.55
8.3.50.0170.00221.92
8.3.40.0140.00018.83
8.3.30.0070.00719.21
8.3.20.0000.00820.38
8.3.10.0060.00323.48
8.3.00.0070.00418.89
8.2.180.0160.01016.48
8.2.170.0040.01122.96
8.2.160.0100.00320.27
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0040.00419.26
8.2.110.0000.00922.11
8.2.100.0000.01122.11
8.2.90.0080.00019.02
8.2.80.0050.00317.97
8.2.70.0000.01017.63
8.2.60.0040.00417.93
8.2.50.0030.00618.07
8.2.40.0040.00418.09
8.2.30.0040.00418.24
8.2.20.0040.00417.76
8.2.10.0040.00418.19
8.2.00.0040.00419.48
8.1.280.0150.00325.92
8.1.270.0030.00623.84
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0040.00422.18
8.1.230.0060.00619.16
8.1.220.0070.00017.79
8.1.210.0060.00318.77
8.1.200.0040.00717.47
8.1.190.0000.00817.47
8.1.180.0080.00018.10
8.1.170.0030.00518.57
8.1.160.0000.00721.87
8.1.150.0000.00818.64
8.1.140.0040.00417.48
8.1.130.0000.00717.84
8.1.120.0000.00717.44
8.1.110.0050.00217.44
8.1.100.0040.00417.48
8.1.90.0000.00717.46
8.1.80.0040.00417.46
8.1.70.0030.00317.36
8.1.60.0030.00617.65
8.1.50.0040.00417.52
8.1.40.0040.00417.52
8.1.30.0030.00617.66
8.1.20.0000.00717.64
8.1.10.0030.00517.60
8.1.00.0060.00317.54
8.0.300.0000.00818.77
8.0.290.0080.00016.75
8.0.280.0000.00718.49
8.0.270.0030.00317.27
8.0.260.0000.00817.27
8.0.250.0030.00316.91
8.0.240.0000.00717.08
8.0.230.0000.00716.98
8.0.220.0030.00316.95
8.0.210.0060.00016.89
8.0.200.0000.00617.02
8.0.190.0070.00017.05
8.0.180.0000.01016.95
8.0.170.0000.00817.01
8.0.160.0000.00716.79
8.0.150.0030.00516.91
8.0.140.0000.00816.78
8.0.130.0000.00613.38
8.0.120.0070.00016.95
8.0.110.0050.00316.97
8.0.100.0000.00716.99
8.0.90.0040.00416.93
8.0.80.0110.01016.93
8.0.70.0020.00516.91
8.0.60.0030.00316.95
8.0.50.0030.00316.89
8.0.30.0060.01717.08
8.0.20.0140.00517.40
8.0.10.0030.00517.05
8.0.00.0110.00916.76
7.4.330.0030.00315.10
7.4.320.0060.00016.51
7.4.300.0000.00616.52
7.4.290.0000.00716.41
7.4.280.0040.00416.52
7.4.270.0070.00016.61
7.4.260.0030.00516.59
7.4.250.0000.00816.36
7.4.240.0040.00416.64
7.4.230.0030.00316.69
7.4.220.0100.00716.57
7.4.210.0070.00916.64
7.4.200.0000.00716.41
7.4.160.0100.00716.89
7.4.150.0060.01217.40
7.4.140.0070.01217.86
7.4.130.0070.01016.56
7.4.120.0120.00516.61
7.4.110.0120.00416.67
7.4.100.0130.00616.49
7.4.90.0100.00716.65
7.4.80.0140.00319.39
7.4.70.0090.00916.58
7.4.60.0170.00016.39
7.4.50.0000.00416.39
7.4.40.0040.01216.49
7.4.30.0130.00916.50
7.4.00.0000.01314.91
7.3.330.0020.00213.22
7.3.320.0000.00513.13
7.3.310.0000.00716.42
7.3.300.0030.00316.46
7.3.290.0120.00316.39
7.3.280.0110.00816.39
7.3.270.0100.01017.40
7.3.260.0030.01716.56
7.3.250.0150.00316.52
7.3.240.0030.01316.29
7.3.230.0110.00616.39
7.3.210.0060.01316.37
7.3.200.0020.02119.39
7.3.190.0140.00316.56
7.3.180.0070.01016.35
7.3.170.0100.00616.38
7.3.160.0050.01016.45
7.3.120.0000.01514.99
7.3.10.0000.01516.48
7.3.00.0070.01116.32
7.2.330.0060.01016.65
7.2.320.0120.00616.67
7.2.310.0150.00616.77
7.2.300.0000.01916.72
7.2.290.0140.00916.85
7.2.130.0100.01016.80
7.2.120.0100.00716.59
7.2.110.0070.01516.72
7.2.100.0030.01016.66
7.2.90.0130.01016.68
7.2.80.0070.01216.75
7.2.70.0180.00716.66
7.2.60.0120.01016.65
7.2.50.0000.01416.64
7.2.40.0130.00316.83
7.2.30.0030.01016.95
7.2.20.0110.00316.64
7.2.10.0060.00316.58
7.2.00.0010.01417.97
7.1.250.0070.00315.68
7.1.200.0060.00615.41
7.1.100.0000.01118.39
7.1.70.0040.00417.19
7.1.60.0190.00619.70
7.1.50.0070.01716.98
7.1.00.0030.07722.44
7.0.200.0040.00416.88
7.0.140.0000.07322.05
7.0.60.0230.07319.99
7.0.50.0030.06317.98
7.0.40.0030.08720.23
7.0.30.0270.05720.27
7.0.20.0300.06020.30
7.0.10.0270.07320.21
7.0.00.0070.06020.16
5.6.280.0030.07021.03
5.6.210.0130.07320.52
5.6.200.0130.05718.19
5.6.190.0130.07720.33
5.6.180.0070.08020.61
5.6.170.0270.05020.47
5.6.160.0100.03720.56
5.6.150.0030.04318.15
5.6.140.0030.05718.14
5.6.130.0170.07718.18
5.6.120.0170.04721.05
5.6.110.0300.05720.95
5.6.100.0100.07021.09
5.6.90.0070.08720.95
5.6.80.0000.04720.29
5.6.70.0230.03720.42
5.5.350.0000.08320.41
5.5.340.0200.04317.99
5.5.330.0070.08320.44
5.5.320.0330.06020.34
5.5.310.0170.04320.32
5.5.300.0000.05018.05
5.5.290.0100.07717.98
5.5.280.0030.04020.90
5.5.270.0070.06020.84
5.5.260.0170.07320.67
5.5.250.0270.05720.71
5.5.240.0070.08320.27
5.4.450.0130.05043.72
5.4.440.0330.03737.16
5.4.430.0530.03733.62
5.4.420.0400.04333.62
5.4.410.0430.03733.61
5.4.400.0400.05031.27
5.4.390.0230.04331.27
5.4.380.0170.05718.68
5.4.370.0200.05718.68
5.4.360.0200.05318.74
5.4.350.0200.05318.61
5.4.340.0230.04718.48
5.4.320.0100.03112.52
5.4.310.0080.03412.52
5.4.300.0050.03712.53
5.4.290.0060.03812.51
5.4.280.0060.03512.41
5.4.270.0030.03912.41
5.4.260.0070.03612.41
5.4.250.0060.04912.41
5.4.240.0080.03312.41
5.4.230.0070.03812.40
5.4.220.0060.04412.41
5.4.210.0080.03812.40
5.4.200.0100.03612.41
5.4.190.0050.04012.40
5.4.180.0070.03612.40
5.4.170.0070.03512.41
5.4.160.0080.04312.40
5.4.150.0070.03712.40
5.4.140.0090.03412.09
5.4.130.0070.04012.07
5.4.120.0060.04012.04
5.4.110.0040.03912.04
5.4.100.0080.03312.04
5.4.90.0090.03412.04
5.4.80.0060.03612.03
5.4.70.0040.03712.03
5.4.60.0050.03912.03
5.4.50.0110.03112.04
5.4.40.0090.04512.02
5.4.30.0070.03412.02
5.4.20.0090.03312.02
5.4.10.0070.03312.02
5.4.00.0070.03411.51
5.3.290.0030.04112.80
5.3.280.0050.03812.71
5.3.270.0040.04412.72
5.3.260.0060.04012.72
5.3.250.0050.03912.72
5.3.240.0060.03812.72
5.3.230.0060.03812.71
5.3.220.0040.04012.68
5.3.210.0070.03912.68
5.3.200.0050.03712.68
5.3.190.0090.03512.68
5.3.180.0100.03712.68
5.3.170.0070.03612.67
5.3.160.0080.03312.67
5.3.150.0090.03412.67
5.3.140.0100.03912.66
5.3.130.0080.04112.66
5.3.120.0090.03512.66
5.3.110.0110.03612.66
5.3.100.0080.03512.14
5.3.90.0070.03612.12
5.3.80.0070.03812.11
5.3.70.0050.03812.11
5.3.60.0040.04112.10
5.3.50.0070.04612.04
5.3.40.0050.03712.04
5.3.30.0060.03612.00
5.3.20.0070.03511.78
5.3.10.0060.03811.75
5.3.00.0060.04311.73
5.2.170.0050.0339.23
5.2.160.0060.0329.23
5.2.150.0040.0319.23
5.2.140.0020.0329.23
5.2.130.0080.0259.18
5.2.120.0040.0299.18
5.2.110.0100.0249.19
5.2.100.0070.0309.18
5.2.90.0050.0289.18
5.2.80.0060.0299.18
5.2.70.0040.0349.18
5.2.60.0040.0359.13
5.2.50.0030.0329.11
5.2.40.0070.0309.08
5.2.30.0060.0319.06
5.2.20.0100.0359.04
5.2.10.0070.0268.95
5.2.00.0030.0328.82
5.1.60.0030.0258.09
5.1.50.0040.0258.09
5.1.40.0060.0228.08
5.1.30.0060.0248.42
5.1.20.0070.0248.45
5.1.10.0020.0288.17
5.1.00.0060.0308.17
5.0.50.0050.0236.65
5.0.40.0030.0206.51
5.0.30.0040.0376.32
5.0.20.0020.0236.29
5.0.10.0040.0196.26
5.0.00.0020.0316.25
4.4.90.0040.0204.78
4.4.80.0010.0174.76
4.4.70.0020.0184.75
4.4.60.0050.0154.75
4.4.50.0060.0154.77
4.4.40.0020.0264.71
4.4.30.0060.0174.76
4.4.20.0030.0214.84
4.4.10.0020.0164.85
4.4.00.0030.0324.76
4.3.110.0020.0174.67
4.3.100.0020.0164.67
4.3.90.0030.0144.63
4.3.80.0020.0254.59
4.3.70.0040.0154.63
4.3.60.0020.0174.62
4.3.50.0030.0154.62
4.3.40.0030.0244.54
4.3.30.0020.0163.30
4.3.20.0000.0223.28
4.3.10.0030.0143.24
4.3.00.0030.01331.25

preferences:
43.62 ms | 401 KiB | 5 Q