3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public function __construct($args= []) { $this->throwException($args); } private function throwException($args) { if(!array_key_exists('fullname', $args)) throw new \Exception("Fullname"); if(!array_key_exists('username', $args)) throw new \Exception("Fullname"); if(!array_key_exists('password', $args)) throw new \Exception("Fullname"); } } $u = new User(['fullname' => 'Chuck Norris', 'username' => 'Chuck', 'password' => '12345678']);

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.0100.01016.75
8.3.50.0100.00822.93
8.3.40.0070.00718.81
8.3.30.0060.00919.22
8.3.20.0070.00020.16
8.3.10.0030.00523.53
8.3.00.0040.00419.18
8.2.180.0110.00716.63
8.2.170.0070.00722.96
8.2.160.0110.00418.79
8.2.150.0060.00324.18
8.2.140.0060.00324.66
8.2.130.0120.00626.16
8.2.120.0040.00421.02
8.2.110.0090.00022.25
8.2.100.0110.00018.22
8.2.90.0040.00419.26
8.2.80.0050.00317.97
8.2.70.0080.00017.62
8.2.60.0040.00418.03
8.2.50.0030.00518.07
8.2.40.0030.00618.15
8.2.30.0000.00718.00
8.2.20.0000.00817.75
8.2.10.0000.00717.99
8.2.00.0080.00017.61
8.1.280.0060.01025.92
8.1.270.0080.00823.81
8.1.260.0040.00426.35
8.1.250.0070.00728.09
8.1.240.0060.00322.02
8.1.230.0040.00819.02
8.1.220.0060.00317.79
8.1.210.0080.00018.77
8.1.200.0030.00717.25
8.1.190.0060.00317.23
8.1.180.0000.00818.10
8.1.170.0000.00818.54
8.1.160.0000.00721.92
8.1.150.0040.00418.77
8.1.140.0000.00717.43
8.1.130.0030.00317.78
8.1.120.0000.00717.50
8.1.110.0040.00417.43
8.1.100.0040.00417.39
8.1.90.0000.00717.42
8.1.80.0030.00417.35
8.1.70.0030.00317.42
8.1.60.0030.00617.52
8.1.50.0030.00517.50
8.1.40.0000.00817.54
8.1.30.0030.00617.71
8.1.20.0070.00017.55
8.1.10.0040.00417.46
8.1.00.0060.00317.44
8.0.300.0030.00618.77
8.0.290.0050.00216.58
8.0.280.0000.00718.36
8.0.270.0040.00417.12
8.0.260.0030.00317.17
8.0.250.0000.00616.82
8.0.240.0040.00417.02
8.0.230.0030.00316.94
8.0.220.0000.00716.89
8.0.210.0030.00316.80
8.0.200.0050.00316.87
8.0.190.0040.00417.02
8.0.180.0000.00716.80
8.0.170.0000.00816.93
8.0.160.0040.00416.83
8.0.150.0030.00316.77
8.0.140.0050.00516.86
8.0.130.0030.00313.29
8.0.120.0040.00416.89
8.0.110.0000.00716.93
8.0.100.0000.00716.78
8.0.90.0000.00816.85
8.0.80.0100.00616.89
8.0.70.0040.00416.93
8.0.60.0050.00216.79
8.0.50.0000.00716.77
8.0.30.0070.01217.04
8.0.20.0100.00817.40
8.0.10.0030.00517.04
8.0.00.0100.00716.74
7.4.330.0000.00515.00
7.4.320.0000.00616.48
7.4.300.0030.00316.58
7.4.290.0040.00416.53
7.4.280.0040.00416.50
7.4.270.0000.00716.57
7.4.260.0030.00616.46
7.4.250.0040.00416.54
7.4.240.0040.00416.54
7.4.230.0000.00716.53
7.4.220.0110.00716.53
7.4.210.0130.00616.56
7.4.200.0030.00616.71
7.4.160.0100.00616.35
7.4.150.0070.01017.40
7.4.140.0100.01317.86
7.4.130.0070.01016.58
7.4.120.0100.00616.41
7.4.110.0070.01116.38
7.4.100.0140.00516.59
7.4.90.0100.00716.59
7.4.80.0100.01019.39
7.4.70.0130.00316.52
7.4.60.0000.01616.51
7.4.50.0060.00016.40
7.4.40.0090.01516.56
7.4.30.0150.00416.65
7.4.00.0130.00314.76
7.3.330.0030.00313.18
7.3.320.0050.00013.22
7.3.310.0080.00016.11
7.3.300.0000.00716.24
7.3.290.0000.01516.23
7.3.280.0080.00916.21
7.3.270.0090.01417.40
7.3.260.0150.00916.47
7.3.250.0080.00916.29
7.3.240.0130.00316.53
7.3.230.0100.00616.39
7.3.210.0110.01116.38
7.3.200.0070.01319.39
7.3.190.0090.00916.42
7.3.180.0030.01316.50
7.3.170.0080.00816.41
7.3.160.0090.00916.34
7.2.330.0110.00516.51
7.2.320.0060.00916.59
7.2.310.0160.00016.39
7.2.300.0100.00716.74
7.2.290.0120.00616.37
7.2.00.0030.00919.12
7.1.100.0080.00417.95
7.1.70.0000.00717.15
7.1.60.0100.01419.40
7.1.50.0040.01516.80
7.1.00.0030.07722.31
7.0.200.0030.01016.84
7.0.140.0030.07722.09
7.0.60.0070.08319.82
7.0.50.0000.06717.97
7.0.40.0070.09020.18
7.0.30.0300.08320.09
7.0.20.0200.04720.24
7.0.10.0130.07320.12
7.0.00.0070.03720.18
5.6.280.0070.06721.11
5.6.210.0100.08320.55
5.6.200.0070.08018.16
5.6.190.0030.04320.39
5.6.180.0300.04320.47
5.6.170.0230.04020.54
5.6.160.0070.05320.44
5.6.150.0070.08018.21
5.6.140.0100.07318.15
5.6.130.0030.05318.18
5.6.120.0070.08020.93
5.6.110.0100.07721.10
5.6.100.0030.08721.00
5.6.90.0030.06020.91
5.6.80.0130.07020.43
5.5.350.0330.07020.48
5.5.340.0070.08318.03
5.5.330.0030.04320.13
5.5.320.0400.04320.35
5.5.310.0270.04020.19
5.5.300.0030.05718.07
5.5.290.0130.08017.96
5.5.280.0070.07720.99
5.5.270.0100.08020.95
5.5.260.0030.07320.77
5.5.250.0000.09020.59
5.5.240.3870.03020.15
5.4.450.0530.04019.55
5.4.440.1470.06319.18
5.4.430.0530.04719.46
5.4.420.0470.04719.54
5.4.410.0200.04319.51
5.4.400.0330.03719.23
5.4.390.0400.03319.22
5.4.380.0270.05718.57
5.4.370.0400.04718.78
5.4.360.0500.04318.63
5.4.350.0300.06018.82
5.4.340.0400.04718.73
5.4.320.0080.03412.50
5.4.310.0050.03912.50
5.4.300.0110.04012.51
5.4.290.0040.04012.50
5.4.280.0060.03612.40
5.4.270.0050.03712.40
5.4.260.0040.03912.39
5.4.250.0030.04012.40
5.4.240.0040.03712.40
5.4.230.0050.03712.39
5.4.220.0070.03412.39
5.4.210.0070.03512.39
5.4.200.0050.04712.39
5.4.190.0040.04312.39
5.4.180.0070.03412.38
5.4.170.0050.03612.39
5.4.160.0100.03612.39
5.4.150.0050.03612.39
5.4.140.0040.03812.07
5.4.130.0080.03212.06
5.4.120.0040.03712.02
5.4.110.0040.05412.01
5.4.100.0080.04112.02
5.4.90.0060.03712.02
5.4.80.0060.03612.02
5.4.70.0050.03512.01
5.4.60.0070.04212.01
5.4.50.0040.03712.01
5.4.40.0060.03412.00
5.4.30.0110.04012.00
5.4.20.0040.03812.00
5.4.10.0080.03112.00
5.4.00.0040.03711.48
5.3.290.0070.04212.80
5.3.280.0060.03912.71
5.3.270.0050.04312.73
5.3.260.0090.03712.71
5.3.250.0090.03712.72
5.3.240.0080.03512.71
5.3.230.0060.03712.71
5.3.220.0040.03812.68
5.3.210.0090.03512.68
5.3.200.0060.03712.68
5.3.190.0080.03612.67
5.3.180.0070.03812.68
5.3.170.0080.03512.67
5.3.160.0090.03512.68
5.3.150.0090.04412.67
5.3.140.0080.03612.66
5.3.130.0090.03612.66
5.3.120.0050.04112.66
5.3.110.0080.03812.66
5.3.100.0030.04012.13
5.3.90.0080.03512.11
5.3.80.0070.03512.10
5.3.70.0020.04012.09
5.3.60.0040.03812.08
5.3.50.0060.03712.02
5.3.40.0100.03212.02
5.3.30.0080.03211.98
5.3.20.0050.03711.76
5.3.10.0060.03511.73
5.3.00.0100.03111.72
5.2.170.0040.0329.22
5.2.160.0060.0369.22
5.2.150.0030.0329.22
5.2.140.0030.0329.21
5.2.130.0040.0299.17
5.2.120.0060.0269.17
5.2.110.0060.0279.18
5.2.100.0070.0279.18
5.2.90.0030.0319.18
5.2.80.0060.0299.17
5.2.70.0050.0309.18
5.2.60.0050.0299.13
5.2.50.0070.0339.10
5.2.40.0050.0289.07
5.2.30.0030.0319.05
5.2.20.0050.0289.04
5.2.10.0020.0318.95
5.2.00.0070.0268.80
5.1.60.0040.0238.09
5.1.50.0040.0258.09
5.1.40.0060.0228.07
5.1.30.0030.0278.42
5.1.20.0030.0278.44
5.1.10.0020.0278.17
5.1.00.0080.0218.17
5.0.50.0020.0216.64
5.0.40.0040.0186.50
5.0.30.0040.0306.31
5.0.20.0040.0186.28
5.0.10.0030.0256.26
5.0.00.0040.0296.25
4.4.90.0030.0154.78
4.4.80.0020.0164.75
4.4.70.0030.0154.76
4.4.60.0030.0194.76
4.4.50.0040.0144.77
4.4.40.0020.0264.71
4.4.30.0020.0164.76
4.4.20.0040.0144.84
4.4.10.0020.0164.85
4.4.00.0040.0244.76
4.3.110.0010.0174.67
4.3.100.0030.0154.66
4.3.90.0020.0154.63
4.3.80.0050.0214.58
4.3.70.0050.0124.63
4.3.60.0000.0174.63
4.3.50.0030.0154.63
4.3.40.0050.0224.54
4.3.30.0000.0183.30
4.3.20.0030.0143.28
4.3.10.0030.0143.23
4.3.00.0070.01715.63

preferences:
39.61 ms | 401 KiB | 5 Q