3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t1 = hrtime(true); for ($i = 0; $i < 6000000; $i++) { hi1("hi", $i, [], new stdClass(), 0.0, true); } $t2 = hrtime(true); $t3 = hrtime(true); for ($i = 0; $i < 6000000; $i++) { hi2("hi", $i, [], new stdClass(), 0.0, true); } $t4 = hrtime(true); echo "Without types: " . (($t2 - $t1) / 1000000) . " ms\n"; echo "With types : " . (($t4 - $t3) / 1000000) . " ms\n"; /** * @param string $a * @param int $b * @param array $c * @param stdClass $d * @param float $e * @param bool $f * @return void */ function hi1($a, $b, $c, $d, $e, $f) { } function hi2(string $a, int $b, array $c, stdClass $d, float $e, bool $f): void { }

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.130.0100.46518.52
8.3.120.0130.47518.89
8.3.110.0100.53120.94
8.3.100.0000.47418.31
8.3.90.0070.46716.54
8.3.80.0000.57418.43
8.3.70.0200.86816.50
8.3.60.0130.85318.43
8.3.50.0070.73418.32
8.3.40.0100.89218.76
8.3.30.0030.86918.54
8.3.20.0100.48022.15
8.3.10.0000.49420.29
8.3.00.0100.48922.42
8.2.250.0070.49016.58
8.2.240.0070.46017.23
8.2.230.0030.47822.58
8.2.220.0100.45624.06
8.2.210.0030.47726.77
8.2.200.0100.55516.88
8.2.190.0130.89816.58
8.2.180.0130.92718.39
8.2.170.0100.89722.96
8.2.160.0070.86821.05
8.2.150.0100.46024.18
8.2.140.0030.47824.66
8.2.130.0030.47726.16
8.2.120.0070.50426.16
8.2.110.0030.91519.27
8.2.100.0100.79317.91
8.2.90.0070.71620.59
8.2.80.0000.78917.97
8.2.70.0100.76517.91
8.2.60.0030.82117.78
8.2.50.0070.78618.10
8.2.40.0030.86119.21
8.2.30.0000.84519.26
8.2.20.0070.88318.00
8.2.10.0030.82019.50
8.2.00.0030.80019.29
8.1.300.0100.50017.71
8.1.290.0100.56618.88
8.1.280.0131.06525.92
8.1.270.0030.46522.47
8.1.260.0130.45926.35
8.1.250.0070.57528.09
8.1.240.0070.90620.71
8.1.230.0100.67920.93
8.1.220.0000.78717.77
8.1.210.0030.70918.96
8.1.200.0030.85017.23
8.1.190.0070.80317.10
8.1.180.0070.77818.10
8.1.170.0000.78518.59
8.1.160.0070.74318.88
8.1.150.0070.78718.82
8.1.140.0030.78622.72
8.1.130.0030.66520.14
8.1.120.0070.79417.36
8.1.110.0070.85617.51
8.1.100.0030.78517.45
8.1.90.0030.74317.52
8.1.80.0030.78117.48
8.1.70.0030.77417.42
8.1.60.0070.89817.48
8.1.50.0030.90517.52
8.1.40.0000.91017.48
8.1.30.0070.90517.61
8.1.20.0030.90517.60
8.1.10.0030.91117.61
8.1.00.0070.90017.41
8.0.300.0030.70419.82
8.0.290.0070.84016.63
8.0.280.0000.80618.50
8.0.270.0030.82016.88
8.0.260.0070.71920.11
8.0.250.0000.81916.98
8.0.240.0070.87617.06
8.0.230.0030.90317.06
8.0.220.0070.74716.95
8.0.210.0000.79916.88
8.0.200.0030.81216.91
8.0.190.0000.91416.98
8.0.180.0000.92816.97
8.0.170.0031.01716.98
8.0.160.0070.90816.86
8.0.150.0100.97816.95
8.0.140.0000.91616.95
8.0.130.0000.91513.38
8.0.120.0100.96316.91
8.0.110.0170.94117.02
8.0.100.0000.91816.98
8.0.90.0030.91117.02
8.0.80.0071.20816.91
8.0.70.0070.92616.93
8.0.60.0030.94116.89
8.0.50.0101.04216.78
8.0.30.0431.20817.04
8.0.20.0131.15317.06
8.0.10.0030.91117.02
8.0.00.0161.26417.08
7.4.330.0030.94515.55
7.4.320.0030.90516.39
7.4.300.0170.93816.51
7.4.290.0071.00116.35
7.4.280.0071.02816.64
7.4.270.0030.99016.50
7.4.260.0070.98513.17
7.4.250.0070.99216.39
7.4.240.0071.01416.59
7.4.230.0001.00416.51
7.4.220.0000.99616.33
7.4.210.0171.38916.64
7.4.200.0001.00416.31
7.4.130.0201.47416.52
7.4.120.0131.48316.34
7.4.110.0131.35816.59
7.4.100.0171.37816.63
7.4.90.0161.37816.63
7.4.80.0132.04919.39
7.4.70.0131.22216.36
7.4.60.0101.30016.66
7.4.50.0131.53016.16
7.4.40.0101.49916.45
7.4.00.0101.50214.98
7.3.330.0031.08616.20
7.3.320.0031.07413.36
7.3.310.0031.09316.30
7.3.300.0071.07716.17
7.3.290.0071.12616.13
7.3.280.0191.88916.32
7.3.260.0131.67816.53
7.3.240.0121.58816.49
7.3.230.0131.74916.49
7.3.210.0071.76816.54
7.3.200.0101.52416.70
7.3.190.0202.30916.45
7.3.180.0061.90216.48
7.3.170.0131.45716.34
7.3.160.0131.57616.44
7.3.90.0251.62914.79
7.3.80.0331.54914.96
7.3.70.0191.62314.72
7.3.60.0131.53614.73
7.3.50.0131.42914.84
7.3.40.0071.71414.91
7.3.30.0191.61314.65
7.3.20.0101.53614.80
7.3.10.0101.41014.62
7.3.00.0071.78014.61
7.2.330.0090.00916.57
7.2.320.0130.00916.70
7.2.310.0040.01216.26
7.2.300.0060.01016.34
7.2.290.0030.01316.61
7.2.220.0170.00714.64
7.2.210.0120.01014.74
7.2.200.0000.01414.79
7.2.190.0100.00914.88
7.2.180.0050.00914.64
7.2.170.0060.01514.82
7.2.160.0100.00514.80
7.2.150.0240.00914.87
7.2.140.0100.00614.96
7.2.130.0110.00715.02
7.2.120.0220.00414.86
7.2.110.0080.01314.88
7.2.100.0150.00915.00
7.2.90.0130.00314.83
7.2.80.0030.01414.89
7.2.70.0140.00414.69
7.2.60.0040.01214.78
7.2.50.0110.00614.96
7.2.40.0070.01414.75
7.2.30.0070.01314.86
7.2.20.0100.00715.02
7.2.10.0120.00614.69
7.2.00.0150.00914.94
7.1.320.0150.00713.58
7.1.310.0140.01113.72
7.1.300.0060.01013.80
7.1.290.0110.00613.73
7.1.280.0100.00513.88
7.1.270.0100.00613.86
7.1.260.0060.00913.80
7.1.250.0130.01213.78

preferences:
41.3 ms | 403 KiB | 5 Q