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.0090.00918.68
8.3.50.0080.00722.11
8.3.40.0070.00718.62
8.3.30.0090.00618.81
8.3.20.0000.00820.26
8.3.10.0040.00423.66
8.3.00.0060.00319.05
8.2.180.0130.01018.26
8.2.170.0110.00422.96
8.2.160.0070.00720.53
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0060.00319.36
8.2.110.0070.00322.08
8.2.100.0130.00017.78
8.2.90.0050.00319.04
8.2.80.0050.00317.97
8.2.70.0070.00317.50
8.2.60.0090.00018.03
8.2.50.0040.00418.07
8.2.40.0060.00320.07
8.2.30.0030.00618.18
8.2.20.0040.00417.68
8.2.10.0050.00318.04
8.2.00.0050.00319.46
8.1.280.0110.01125.92
8.1.270.0080.00023.86
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0000.00923.79
8.1.230.0080.00320.89
8.1.220.0040.00417.74
8.1.210.0080.00418.77
8.1.200.0060.00317.35
8.1.190.0080.00017.35
8.1.180.0000.00818.10
8.1.170.0040.00418.53
8.1.160.0040.00422.02
8.1.150.0040.00418.57
8.1.140.0040.00417.37
8.1.130.0000.00717.76
8.1.120.0000.00717.54
8.1.110.0000.00717.52
8.1.100.0030.00517.52
8.1.90.0040.00417.51
8.1.80.0040.00417.43
8.1.70.0000.00717.39
8.1.60.0080.00017.55
8.1.50.0060.00317.56
8.1.40.0040.00417.50
8.1.30.0000.00817.68
8.1.20.0040.00417.59
8.1.10.0080.00017.60
8.1.00.0060.00617.53
8.0.300.0070.00320.04
8.0.290.0080.00016.75
8.0.280.0000.00718.38
8.0.270.0030.00517.27
8.0.260.0030.00317.22
8.0.250.0030.00316.99
8.0.240.0000.00716.88
8.0.230.0030.00316.96
8.0.220.0070.00016.91
8.0.210.0030.00316.76
8.0.200.0000.00817.02
8.0.190.0070.00016.83
8.0.180.0070.00316.88
8.0.170.0040.00416.79
8.0.160.0070.00016.84
8.0.150.0000.00816.95
8.0.140.0040.00416.86
8.0.130.0070.00013.37
8.0.120.0020.00516.76
8.0.110.0040.00416.88
8.0.100.0040.00416.77
8.0.90.0070.00016.79
8.0.80.0100.01216.86
8.0.70.0000.00716.77
8.0.60.0000.00716.80
8.0.50.0000.00716.89
8.0.30.0110.00817.03
8.0.20.0140.00917.40
8.0.10.0050.00316.84
8.0.00.0090.00916.87
7.4.330.0030.00315.16
7.4.320.0030.00316.51
7.4.300.0070.00016.52
7.4.290.0030.00316.59
7.4.280.0080.00016.49
7.4.270.0000.00816.49
7.4.260.0040.00416.48
7.4.250.0000.00716.56
7.4.240.0000.00716.46
7.4.230.0000.00816.70
7.4.220.0070.01016.45
7.4.210.0090.00916.55
7.4.200.0000.00916.52
7.4.160.0060.01116.48
7.4.150.0070.01117.40
7.4.140.0110.00917.86
7.4.130.0110.00916.45
7.4.120.0080.01116.56
7.4.110.0150.00616.55
7.4.100.0070.01016.57
7.4.90.0100.00616.49
7.4.80.0030.01319.39
7.4.70.0030.01916.50
7.4.60.0000.01716.42
7.4.50.0000.00416.39
7.4.40.0040.01516.48
7.4.30.0060.01616.42
7.4.00.0030.01215.15
7.3.330.0060.00013.14
7.3.320.0000.00613.30
7.3.310.0040.00416.20
7.3.300.0000.00716.23
7.3.290.0170.00316.32
7.3.280.0100.00616.26
7.3.270.0070.01017.40
7.3.260.0130.00616.49
7.3.250.0140.00616.39
7.3.240.0160.00616.36
7.3.230.0100.00716.39
7.3.210.0140.00316.35
7.3.200.0120.00819.39
7.3.190.0090.00616.28
7.3.180.0080.00816.37
7.3.170.0110.00516.55
7.3.160.0080.00816.46
7.3.120.0090.00614.80
7.3.10.0040.01116.71
7.3.00.0030.00616.63
7.2.330.0060.01416.52
7.2.320.0060.01216.89
7.2.310.0070.01016.40
7.2.300.0150.00316.82
7.2.290.0130.00316.80
7.2.130.0030.00616.92
7.2.120.0000.01516.66
7.2.110.0070.00716.91
7.2.100.0060.00617.00
7.2.90.0060.00616.95
7.2.80.0070.00716.76
7.2.70.0040.00416.71
7.2.60.0060.00616.88
7.2.50.0060.00917.07
7.2.40.0070.00316.79
7.2.30.0000.01017.04
7.2.20.0070.00317.14
7.2.10.0060.00817.01
7.2.00.0030.00917.08
7.1.250.0000.00915.57
7.1.70.0000.00717.25
7.1.60.0070.01019.70
7.1.50.0300.00316.83
7.1.00.0070.07022.45
7.0.200.0070.00016.82
7.0.140.0000.07722.04
7.0.60.0100.08721.77
7.0.50.0000.05717.82
7.0.40.0000.05020.06
7.0.30.0200.05020.21
7.0.20.0300.05320.22
7.0.10.0070.04720.20
7.0.00.0170.07020.06
5.6.280.0030.07321.02
5.6.210.0170.06020.73
5.6.200.0070.04318.15
5.6.190.0030.09320.47
5.6.180.3530.04320.46
5.6.170.0270.06320.42
5.6.160.0170.07320.47
5.6.150.0070.08318.29
5.6.140.0030.05718.19
5.6.130.0100.08318.29
5.6.120.0030.08721.12
5.6.110.0200.07321.11
5.6.100.0030.04020.97
5.6.90.0200.07020.87
5.6.80.0070.08020.41
5.5.350.0070.05720.41
5.5.340.0070.07017.92
5.5.330.0030.05720.43
5.5.320.0200.08020.25
5.5.310.0300.08320.32
5.5.300.0100.08318.09
5.5.290.0030.08017.98
5.5.280.0030.04020.78
5.5.270.0070.08720.85
5.5.260.0200.06320.90
5.5.250.0030.07720.79
5.5.240.0200.08020.27
5.4.450.0370.04337.18
5.4.440.0330.04333.66
5.4.430.0330.04333.62
5.4.420.0770.04333.61
5.4.410.0330.04732.42
5.4.400.0130.04731.27
5.4.390.0130.03031.25
5.4.380.0130.06018.73
5.4.370.0270.04318.73
5.4.360.0230.04718.56
5.4.350.0130.06018.70
5.4.340.0100.06018.48
5.4.320.0070.05212.51
5.4.310.0070.04112.51
5.4.300.0050.03712.51
5.4.290.0080.03612.50
5.4.280.0050.03612.40
5.4.270.0110.03112.40
5.4.260.0060.03712.39
5.4.250.0090.04212.40
5.4.240.0050.03712.40
5.4.230.0050.04512.39
5.4.220.0100.03312.39
5.4.210.0070.04812.39
5.4.200.0080.03612.39
5.4.190.0090.03812.39
5.4.180.0090.03912.39
5.4.170.0060.03712.40
5.4.160.0090.03412.39
5.4.150.0080.03412.39
5.4.140.0060.04212.07
5.4.130.0070.04312.06
5.4.120.0030.04212.02
5.4.110.0030.03812.02
5.4.100.0040.03812.02
5.4.90.0050.04212.02
5.4.80.0070.03612.02
5.4.70.0090.05012.01
5.4.60.0030.03812.01
5.4.50.0080.03812.01
5.4.40.0070.03812.00
5.4.30.0070.03512.00
5.4.20.0070.03511.99
5.4.10.0020.04712.00
5.4.00.0090.03911.48
5.3.290.0070.04112.80
5.3.280.0090.03912.70
5.3.270.0050.04012.72
5.3.260.0100.03712.71
5.3.250.0080.04212.72
5.3.240.0090.04412.72
5.3.230.0040.04012.71
5.3.220.0090.03412.68
5.3.210.0090.03612.68
5.3.200.0070.03612.68
5.3.190.0050.04012.68
5.3.180.0100.04912.68
5.3.170.0080.03512.66
5.3.160.0050.03812.68
5.3.150.0070.03912.67
5.3.140.0040.03812.66
5.3.130.0070.03712.66
5.3.120.0040.04012.66
5.3.110.0090.03512.66
5.3.100.0040.03912.14
5.3.90.0070.03512.12
5.3.80.0040.03912.11
5.3.70.0080.03512.11
5.3.60.0070.03512.09
5.3.50.0070.03512.05
5.3.40.0030.03812.04
5.3.30.0040.04512.01
5.3.20.0070.04111.79
5.3.10.0070.03411.75
5.3.00.0070.04211.73
5.2.170.0040.0349.23
5.2.160.0090.0259.23
5.2.150.0030.0389.22
5.2.140.0060.0299.22
5.2.130.0060.0279.18
5.2.120.0070.0279.19
5.2.110.0100.0319.19
5.2.100.0050.0289.18
5.2.90.0060.0299.18
5.2.80.0070.0309.18
5.2.70.0050.0359.18
5.2.60.0090.0289.13
5.2.50.0090.0319.11
5.2.40.0060.0369.08
5.2.30.0070.0309.06
5.2.20.0050.0369.04
5.2.10.0040.0288.95
5.2.00.0050.0298.82
5.1.60.0080.0258.09
5.1.50.0050.0278.09
5.1.40.0040.0258.07
5.1.30.0020.0288.42
5.1.20.0060.0298.45
5.1.10.0040.0258.17
5.1.00.0070.0298.17
5.0.50.0070.0286.64
5.0.40.0060.0266.51
5.0.30.0050.0406.32
5.0.20.0050.0216.28
5.0.10.0020.0216.27
5.0.00.0030.0316.26
4.4.90.0020.0164.78
4.4.80.0010.0174.75
4.4.70.0040.0144.76
4.4.60.0010.0174.75
4.4.50.0010.0174.77
4.4.40.0030.0254.71
4.4.30.0010.0174.76
4.4.20.0010.0174.84
4.4.10.0000.0194.84
4.4.00.0020.0254.76
4.3.110.0050.0154.67
4.3.100.0020.0164.66
4.3.90.0040.0204.64
4.3.80.0030.0284.59
4.3.70.0040.0234.63
4.3.60.0010.0214.63
4.3.50.0040.0194.63
4.3.40.0050.0214.54
4.3.30.0060.0203.30
4.3.20.0000.0223.28
4.3.10.0010.0163.24
4.3.00.0030.02031.24

preferences:
49.47 ms | 401 KiB | 5 Q