3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sum_int(int $a, int $b) : int { return $a + $b; } function sum_float(float $a, float $b) : float { return $a + $b; } function substract_int(int $a, int $b) : int { return $a - $b; } function substract_float(float $a, float $b) : float { return $a - $b; } function multiply_int(int $a, int $b) : int { return $a * $b; } function multiply_float(float $a, float $b) : float { return $a * $b; } function divide_int(int $a, int $b) : int { return $a / $b; } function divide_float(float $a, float $b) : float { return $a / $b; } echo "La somme de 9 + 14 = " . sum_int(9, 14) . "\r\n"; echo "La somme de 1.895 + 8.105 = " . sum_int(1.895, 8.105) . "\r\n"; echo "La soustraction de 9 - 14 = " . substract_int(9, 14) . "\r\n"; echo "La soustraction de 1.895 - 8.105 = " . substract_int(1.895, 8.105) . "\r\n"; echo "La multiplication de 9 * 14 = " . multiply_int(9, 14) . "\r\n"; echo "La multiplication de 1.895 * 8.105 = " . multiply_int(1.895, 8.105) . "\r\n"; echo "La division de 9 / 14 = " . divide_int(9, 14) . "\r\n"; echo "La division de 1.895 / 8.105 = " . divide_int(1.895, 8.105) . "\r\n";

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.0160.00316.50
8.3.50.0170.00321.20
8.3.40.0070.01118.57
8.3.30.0040.01118.70
8.3.20.0070.00720.42
8.3.10.0030.00521.81
8.3.00.0080.00019.81
8.2.180.0090.00918.29
8.2.170.0120.00322.96
8.2.160.0130.00020.38
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00417.75
8.2.110.0100.00022.05
8.2.100.0090.00317.63
8.2.90.0000.00819.09
8.2.80.0080.00017.97
8.2.70.0050.00317.75
8.2.60.0030.00618.03
8.2.50.0060.00318.07
8.2.40.0070.00019.28
8.2.30.0090.00018.00
8.2.20.0000.00717.62
8.2.10.0000.00818.01
8.2.00.0040.00417.88
8.1.280.0070.00725.92
8.1.270.0040.00420.26
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0030.00622.47
8.1.230.0100.00617.42
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.10
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0070.00018.71
8.1.160.0070.00022.13
8.1.150.0070.00018.84
8.1.140.0050.00317.30
8.1.130.0030.00317.48
8.1.120.0030.00517.36
8.1.110.0000.00717.40
8.1.100.0070.00017.46
8.1.90.0040.00417.36
8.1.80.0060.00317.39
8.1.70.0040.00417.46
8.1.60.0050.00317.53
8.1.50.0030.00517.38
8.1.40.0000.00817.50
8.1.30.0040.00417.50
8.1.20.0030.00617.52
8.1.10.0000.00817.41
8.1.00.0000.00817.44
8.0.300.0080.00618.77
8.0.290.0040.00416.75
8.0.280.0070.00018.45
8.0.270.0050.00217.26
8.0.260.0100.00017.27
8.0.250.0000.00716.96
8.0.240.0040.00417.03
8.0.230.0030.00317.02
8.0.220.0000.00716.86
8.0.210.0070.00016.95
8.0.200.0000.00717.05
8.0.190.0070.00017.02
8.0.180.0050.00316.95
8.0.170.0040.00416.99
8.0.160.0000.00716.96
8.0.150.0000.00716.93
8.0.140.0000.00816.87
8.0.130.0000.00513.32
8.0.120.0040.00416.94
8.0.110.0040.00416.90
8.0.100.0040.00416.96
8.0.90.0070.00017.00
8.0.80.0070.01417.00
8.0.70.0030.00316.98
8.0.60.0040.00416.79
8.0.50.0000.00816.76
8.0.30.0090.01016.97
8.0.20.0120.01217.40
8.0.10.0070.00017.06
8.0.00.0090.01016.81
7.4.330.0020.00215.08
7.4.320.0030.00316.50
7.4.300.0040.00416.53
7.4.290.0070.00016.35
7.4.280.0040.00416.54
7.4.270.0030.00316.37
7.4.260.0040.00716.55
7.4.250.0040.00416.37
7.4.240.0030.00416.33
7.4.230.0070.00016.56
7.4.220.0040.01416.39
7.4.210.0060.00916.40
7.4.200.0000.00716.55
7.4.160.0090.00616.40
7.4.150.0130.01317.40
7.4.140.0120.01317.86
7.4.130.0120.00616.23
7.4.120.0030.01516.52
7.4.110.0080.01516.36
7.4.100.0120.00916.43
7.4.90.0130.00316.45
7.4.80.0000.02019.39
7.4.70.0100.00716.34
7.4.60.0100.01316.48
7.4.50.0000.00716.50
7.4.40.0110.00616.17
7.4.30.0040.01416.50
7.4.10.0040.01514.93
7.4.00.0100.00814.95
7.3.330.0000.00513.42
7.3.320.0000.00613.26
7.3.310.0030.00416.32
7.3.300.0040.00416.40
7.3.290.0070.01116.42
7.3.280.0040.01416.34
7.3.270.0030.01517.40
7.3.260.0190.00016.43
7.3.240.0040.01316.37
7.3.230.0100.01316.68
7.3.210.0130.00316.35
7.3.200.0210.00316.32
7.3.190.0060.01216.44
7.3.180.0120.00316.37
7.3.170.0120.00316.62
7.3.160.0000.01716.56
7.3.130.0060.01214.54
7.3.120.0100.00715.11
7.3.110.0050.01315.03
7.3.100.0080.00814.94
7.3.90.0070.00714.78
7.3.80.0080.00815.12
7.3.70.0060.00514.96
7.3.60.0070.00714.94
7.3.50.0060.00814.83
7.3.40.0030.00914.99
7.3.30.0060.00815.05
7.3.20.0050.00616.81
7.3.10.0060.00716.69
7.3.00.0070.00916.68
7.2.330.0120.00616.38
7.2.320.0040.01816.56
7.2.310.0130.00416.64
7.2.300.0180.00316.64
7.2.290.0120.00416.59
7.2.260.0100.00714.93
7.2.250.0070.01015.18
7.2.240.0050.01315.07
7.2.230.0080.00815.19
7.2.220.0040.00915.07
7.2.210.0070.00615.09
7.2.200.0020.01215.06
7.2.190.0030.00915.13
7.2.180.0080.00715.11
7.2.170.0080.00515.23
7.2.160.0050.00814.91
7.2.150.0040.01016.83
7.2.140.0090.00716.73
7.2.130.0080.00816.82
7.2.120.0040.00816.68
7.2.110.0080.00716.90
7.2.100.0070.00817.01
7.2.90.0120.00516.81
7.2.80.0070.00716.90
7.2.70.0050.01117.01
7.2.60.0030.01216.86
7.2.50.0070.01016.93
7.2.40.0080.00816.76
7.2.30.0080.00416.89
7.2.20.0050.01016.82
7.2.10.0050.01116.87
7.2.00.0040.01417.70
7.1.330.0060.00815.87
7.1.320.0040.01015.83
7.1.310.0050.00815.79
7.1.300.0040.00815.75
7.1.290.0050.01015.70
7.1.280.0030.00915.71
7.1.270.0040.00915.88
7.1.260.0040.01115.78
7.1.250.0030.00715.58
7.1.240.0110.00015.64
7.1.230.0030.01015.62
7.1.220.0040.01115.83
7.1.210.0030.00615.61
7.1.200.0080.00515.73
7.1.190.0040.01115.58
7.1.180.0050.00315.87
7.1.170.0060.00915.65
7.1.160.0030.01315.89
7.1.150.0070.00715.91
7.1.140.0080.00015.68
7.1.130.0040.01215.70
7.1.120.0000.01115.68
7.1.110.0000.01415.83
7.1.100.0060.00716.87
7.1.90.0120.00315.81
7.1.80.0040.01115.83
7.1.70.0000.00916.40
7.1.60.0100.00617.44
7.1.50.0070.01116.35
7.1.40.0110.00715.81
7.1.30.0040.01115.82
7.1.20.0070.00715.46
7.1.10.0040.00415.84
7.1.00.0060.03819.01
7.0.330.0080.00415.59
7.0.320.0090.00315.20
7.0.310.0100.00315.36
7.0.300.0000.01115.45
7.0.290.0000.01015.20
7.0.280.0060.00615.50
7.0.270.0030.00715.13
7.0.260.0030.00715.22
7.0.250.0030.00715.43
7.0.240.0060.00615.60
7.0.230.0040.01115.50
7.0.220.0040.01115.57
7.0.210.0060.00615.17
7.0.200.0270.00815.04
7.0.190.0030.01415.23
7.0.180.0070.01015.19
7.0.170.0100.00715.48
7.0.160.0040.00815.36
7.0.150.0110.00315.48
7.0.140.0030.00915.26
7.0.130.0100.00715.52
7.0.120.0060.01215.58
7.0.110.0060.00615.36
7.0.100.0000.01115.59
7.0.90.0040.00715.23
7.0.80.0070.00715.54
7.0.70.0030.01015.60
7.0.60.0050.02417.49
7.0.50.0070.03516.84
7.0.40.0090.03016.71
7.0.30.0130.04216.88
7.0.20.0170.03516.94
7.0.10.0120.02816.82
7.0.00.0060.03816.89
5.6.400.0090.00614.28
5.6.390.0030.00614.09
5.6.380.0000.00914.21
5.6.370.0030.00513.98
5.6.360.0030.00714.03
5.6.350.0070.00714.39
5.6.340.0030.01014.32
5.6.330.0080.00414.17
5.6.320.0030.00714.07
5.6.310.0030.01014.11
5.6.300.0030.01014.32
5.6.290.0040.01113.97
5.6.280.0090.03417.41
5.6.270.0100.00314.10
5.6.260.0090.00314.32
5.6.250.0000.01414.16
5.6.240.0070.01014.20
5.6.230.0040.01114.08
5.6.220.0090.00614.18
5.6.210.0070.03317.52
5.6.200.0060.04316.09
5.6.190.0030.04617.44
5.6.180.0130.03617.23
5.6.170.0120.03817.29
5.6.160.0100.03717.30
5.6.150.0050.04616.18
5.6.140.0080.04216.18
5.6.130.0130.01516.06
5.6.120.0030.02717.65
5.6.110.0070.02017.58
5.6.100.0050.03717.55
5.6.90.0070.04517.52
5.6.80.0110.03717.19
5.6.70.2170.02517.13
5.6.60.0030.00914.16
5.6.50.0030.01013.88
5.6.40.0060.01014.19
5.6.30.0030.00714.14
5.6.20.0090.00614.01
5.6.10.0060.00314.16
5.6.00.0000.01314.07
5.5.380.0040.00814.14
5.5.370.0030.00913.98
5.5.360.0070.00714.07
5.5.350.0190.03617.33
5.5.340.0050.03916.13
5.5.330.0120.03517.38
5.5.320.0220.03817.21
5.5.310.0210.04117.02
5.5.300.0070.02316.07
5.5.290.0060.04315.96
5.5.280.0080.03817.48
5.5.270.0030.04717.48
5.5.260.0020.02817.60
5.5.250.0070.03917.27
5.5.240.0050.04417.08
5.5.230.0120.00313.87
5.5.220.0110.00413.83
5.5.210.0110.00414.12
5.5.200.0000.01313.88
5.5.190.0060.00614.08
5.5.180.0030.01014.06
5.5.170.0070.00413.89
5.5.160.0110.00413.93
5.5.150.0090.00313.93
5.5.140.0060.00613.64
5.5.130.0070.00714.17
5.5.120.0120.00313.90
5.5.110.0070.00714.22
5.5.100.0000.01113.81
5.5.90.0050.00513.77
5.5.80.0090.00613.94
5.5.70.0060.00814.14
5.5.60.0130.00014.11
5.5.50.0070.00713.89
5.5.40.0110.00413.82
5.5.30.0110.00014.08
5.5.20.0030.01014.17
5.5.10.0090.00613.71
5.5.00.0060.00913.93
5.4.450.0150.03516.37
5.4.440.0150.02716.26
5.4.430.0110.02416.25
5.4.420.0100.02316.20
5.4.410.0080.02316.31
5.4.400.0110.01816.13
5.4.390.0130.01816.07
5.4.380.0120.03615.99
5.4.370.0130.02516.15
5.4.360.0160.02316.10
5.4.350.0120.02216.09
5.4.340.0120.02516.13
5.4.330.0000.00913.10
5.4.320.0120.04416.05
5.4.310.0070.02715.98
5.4.300.0110.02815.99
5.4.290.0220.01916.15
5.4.280.0200.04015.97
5.4.270.0170.04016.08
5.4.260.0150.02716.13
5.4.250.0120.04316.15
5.4.240.0100.02515.98
5.4.230.0150.03816.09
5.4.220.0080.03016.09
5.4.210.0130.02516.04
5.4.200.0220.01716.01
5.4.190.0200.02316.16
5.4.180.0100.04216.13
5.4.170.0180.02816.04
5.4.160.0270.03716.10
5.4.150.0230.03716.13
5.4.140.0100.04514.70
5.4.130.0120.03814.80
5.4.120.0160.02314.69
5.4.110.0130.03514.73
5.4.100.0150.03914.78
5.4.90.0120.03114.78
5.4.80.0210.02814.64
5.4.70.0040.00713.10
5.4.60.0090.00313.10
5.4.50.0060.00713.10
5.4.40.0060.00613.10
5.4.30.0030.00613.10
5.4.20.0040.00413.10
5.4.10.0000.00813.10
5.4.00.0030.01013.10

preferences:
43.09 ms | 401 KiB | 5 Q