3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public $a, $b; public function __construct($a, $b) { $this->a = $a; $this->b = $b; } public function doSomethingWithA() { /**/ } public function doSomethingWithB() { /**/ } public function doSomethingWithAandB() { /**/ } } // test 1 $c = new C("foo", null); var_dump($c->a, $c->b); var_dump($c->a === "foo"); // test 2 $c = new C(null, "foo"); var_dump($c->b === "foo");

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.0110.00718.30
8.3.50.0080.00921.93
8.3.40.0050.01018.84
8.3.30.0140.00319.09
8.3.20.0000.00820.30
8.3.10.0000.00723.57
8.3.00.0050.00322.40
8.2.180.0150.00416.38
8.2.170.0110.00422.96
8.2.160.0100.00322.08
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0080.00019.36
8.2.110.0030.00622.15
8.2.100.0110.00017.76
8.2.90.0000.00719.09
8.2.80.0050.00317.97
8.2.70.0000.00817.50
8.2.60.0090.00017.80
8.2.50.0040.00418.07
8.2.40.0000.00818.03
8.2.30.0050.00218.10
8.2.20.0030.00617.46
8.2.10.0000.00717.63
8.2.00.0000.00717.61
8.1.280.0070.01125.92
8.1.270.0080.00023.97
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00023.74
8.1.230.0030.00719.05
8.1.220.0000.00817.74
8.1.210.0000.01018.77
8.1.200.0030.00617.34
8.1.190.0000.00917.39
8.1.180.0080.00018.10
8.1.170.0030.00618.64
8.1.160.0000.00721.94
8.1.150.0050.00218.63
8.1.140.0020.00517.27
8.1.130.0000.00717.83
8.1.120.0040.00417.46
8.1.110.0030.00617.41
8.1.100.0000.00717.38
8.1.90.0030.00417.39
8.1.80.0050.00217.38
8.1.70.0070.00017.28
8.1.60.0000.00717.53
8.1.50.0030.00617.46
8.1.40.0080.00017.54
8.1.30.0050.00317.54
8.1.20.0060.00317.69
8.1.10.0040.00417.57
8.1.00.0030.00617.43
8.0.300.0070.00018.77
8.0.290.0050.00217.05
8.0.280.0040.00418.31
8.0.270.0000.00717.18
8.0.260.0040.00416.66
8.0.250.0070.00016.78
8.0.240.0000.00716.89
8.0.230.0000.00716.86
8.0.220.0000.00716.84
8.0.210.0000.00616.82
8.0.200.0030.00516.95
8.0.190.0030.00516.93
8.0.180.0050.00216.86
8.0.170.0030.00516.74
8.0.160.0070.00016.80
8.0.150.0000.00716.79
8.0.140.0000.00716.77
8.0.130.0030.00313.21
8.0.120.0000.00816.83
8.0.110.0000.00816.73
8.0.100.0040.00416.86
8.0.90.0000.00816.82
8.0.80.0120.01016.88
8.0.70.0030.00516.70
8.0.60.0040.00416.64
8.0.50.0050.00316.71
8.0.30.0080.01317.11
8.0.20.0110.00917.40
8.0.10.0070.00016.84
8.0.00.0120.00716.73
7.4.330.0000.00515.00
7.4.320.0000.00616.48
7.4.300.0030.00316.60
7.4.290.0030.00316.35
7.4.280.0040.00416.47
7.4.270.0030.00316.59
7.4.260.0000.00716.48
7.4.250.0000.00716.43
7.4.240.0030.00516.46
7.4.230.0040.00416.34
7.4.220.0120.00616.68
7.4.210.0090.01116.55
7.4.200.0000.00716.49
7.4.190.0000.00716.59
7.4.160.0070.00716.39
7.4.150.0180.00017.40
7.4.140.0100.01017.86
7.4.130.0080.00816.57
7.4.120.0090.00916.48
7.4.110.0110.00616.40
7.4.100.0030.01416.31
7.4.90.0070.01016.54
7.4.80.0140.00716.38
7.4.70.0060.01016.49
7.4.60.0100.00716.30
7.4.50.0000.00816.21
7.4.40.0070.01122.77
7.4.30.0030.01316.51
7.4.00.0070.01014.57
7.3.330.0000.00513.23
7.3.320.0050.00013.24
7.3.310.0040.00416.20
7.3.300.0000.00716.21
7.3.290.0120.00316.26
7.3.280.0110.00616.26
7.3.270.0170.00717.40
7.3.260.0100.01316.25
7.3.250.0110.00716.37
7.3.240.0130.00316.52
7.3.230.0060.01216.51
7.3.210.0130.00316.31
7.3.200.0100.01019.39
7.3.190.0140.00316.29
7.3.180.0090.00916.42
7.3.170.0120.00916.27
7.3.160.0130.00316.42
7.3.120.0040.00915.02
7.3.10.0070.00716.58
7.3.00.0070.00416.57
7.2.330.0080.01216.55
7.2.320.0060.01616.69
7.2.310.0090.01216.80
7.2.300.0130.00316.54
7.2.290.0070.01616.74
7.2.130.0000.01016.98
7.2.120.0040.00816.93
7.2.110.0060.00617.01
7.2.100.0060.00916.96
7.2.90.0110.00317.13
7.2.80.0080.00416.74
7.2.70.0070.00416.97
7.2.60.0070.00716.87
7.2.50.0060.00616.91
7.2.40.0000.00917.11
7.2.30.0000.01216.88
7.2.20.0040.00917.08
7.2.10.0090.00316.63
7.2.00.0000.01416.77
7.1.250.0070.00015.62
7.1.200.0000.01015.46
7.1.70.0000.00717.27
7.1.60.0180.00719.24
7.1.50.0200.01434.88
7.1.00.0100.07022.45
7.0.200.0070.00716.83
7.0.140.0070.06321.94
7.0.60.0130.07719.79
7.0.50.0070.08317.78
7.0.40.0170.03720.40
7.0.30.0530.07020.33
7.0.20.0200.05020.33
7.0.10.0400.06720.07
7.0.00.0030.08320.19
5.6.280.0130.06321.13
5.6.210.0070.06720.73
5.6.200.0070.04018.23
5.6.190.0100.05020.41
5.6.180.0030.05020.66
5.6.170.0230.03720.54
5.6.160.0230.04020.54
5.6.150.0070.04018.11
5.6.140.0070.07318.14
5.6.130.0100.05018.28
5.6.120.0070.05020.98
5.6.110.0170.04720.90
5.6.100.0070.08321.09
5.6.90.0170.07021.11
5.6.80.0100.06320.38
5.6.70.1800.03720.52
5.5.350.0100.04720.45
5.5.340.0130.07718.00
5.5.330.0100.06720.19
5.5.320.0230.06020.18
5.5.310.0200.07020.30
5.5.300.0000.04017.95
5.5.290.0070.05718.07
5.5.280.0070.06020.78
5.5.270.0030.04020.83
5.5.260.0030.07720.68
5.5.250.0100.09020.79
5.5.240.0000.04020.24
5.4.450.0270.04019.19
5.4.440.0330.05319.32
5.4.430.0300.06719.48
5.4.420.0370.06719.31
5.4.410.0300.05019.42
5.4.400.0370.06019.09
5.4.390.0330.06719.23
5.4.380.0300.07319.20
5.4.370.0330.04019.07
5.4.360.0330.05319.02
5.4.350.0300.04019.16
5.4.340.0230.05319.05
5.4.320.0270.04718.99
5.4.310.0330.04319.00
5.4.300.0270.07319.24
5.4.290.0370.05319.21
5.4.280.0300.07019.28
5.4.270.0330.07018.83
5.4.260.0370.06018.87
5.4.250.0230.06318.84
5.4.240.0370.06719.05
5.4.230.0330.04719.09
5.4.220.0300.06719.12
5.4.210.0230.05718.98
5.4.200.0300.06719.23
5.4.190.0230.08019.05
5.4.180.0300.04019.23
5.4.170.0200.04018.98
5.4.160.0300.07019.13
5.4.150.0300.05319.20
5.4.140.0370.06716.32
5.4.130.0330.06016.41
5.4.120.0300.04316.38
5.4.110.0200.03716.54
5.4.100.0170.03716.50
5.4.90.0300.07016.56
5.4.80.0170.03716.49
5.4.70.0170.03316.46
5.4.60.0230.03316.25
5.4.50.0270.04716.53
5.4.40.0200.04016.25
5.4.30.0200.03316.57
5.4.20.0200.03316.52
5.4.10.0200.04316.42
5.4.00.0170.03715.86
5.3.290.0370.06714.75
5.3.280.0300.06014.68
5.3.270.0230.03714.52
5.3.260.0270.06714.59
5.3.250.0300.06714.56
5.3.240.0230.05014.58
5.3.230.0330.06714.61
5.3.220.0270.04314.68
5.3.210.0230.04314.69
5.3.200.0230.03714.49
5.3.190.0130.04714.55
5.3.180.0200.04014.80
5.3.170.0130.04014.68
5.3.160.0170.03714.54
5.3.150.0200.03314.46
5.3.140.0130.04314.67
5.3.130.0170.03714.47
5.3.120.0130.04314.77
5.3.110.0170.03714.53
5.3.100.0200.03314.04
5.3.90.0170.04314.04
5.3.80.0170.03714.24
5.3.70.0200.03313.96
5.3.60.0200.03313.91
5.3.50.0200.03713.86
5.3.40.0200.03314.04
5.3.30.0130.04013.92
5.3.20.0200.03313.92
5.3.10.0130.04313.58
5.3.00.0130.03713.69
5.2.170.0130.03011.84
5.2.160.0100.03311.84
5.2.150.0170.02711.84
5.2.140.0130.03011.84
5.2.130.0130.03311.84
5.2.120.0130.03011.84
5.2.110.0200.02011.84
5.2.100.0170.03711.84
5.2.90.0100.03011.84
5.2.80.0170.03311.84
5.2.70.0070.03711.84
5.2.60.0100.03311.84
5.2.50.0100.03311.84
5.2.40.0100.03011.84
5.2.30.0100.03311.84
5.2.20.0170.02311.84
5.2.10.0170.02311.84
5.2.00.0130.02711.84
5.1.60.0130.02311.84
5.1.50.0170.02011.84
5.1.40.0170.04711.84
5.1.30.0170.05711.84
5.1.20.0170.05711.84
5.1.10.0170.04711.84
5.1.00.0130.04311.84
5.0.50.0200.03011.84
5.0.40.0070.02711.84
5.0.30.0170.06011.84
5.0.20.0100.04711.84
5.0.10.0070.04011.84
5.0.00.0100.05311.84
4.4.90.0070.01711.84
4.4.80.0030.02011.84
4.4.70.0030.01711.84
4.4.60.0070.01311.84
4.4.50.0030.01711.84
4.4.40.0030.02711.84
4.4.30.0100.02011.84
4.4.20.0070.04011.84
4.4.10.0100.02011.84
4.4.00.0100.03711.84
4.3.110.0070.02711.84
4.3.100.0170.03011.84
4.3.90.0100.03711.84
4.3.80.0100.03711.84
4.3.70.0100.03311.84
4.3.60.0100.03711.84
4.3.50.0100.03011.84
4.3.40.0100.03711.84
4.3.30.0030.03011.84
4.3.20.0070.02711.84
4.3.10.0070.02311.84
4.3.00.0030.03311.84

preferences:
44.5 ms | 401 KiB | 5 Q