3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function square(int $a): int { return $a * $a; } print_r(square(4)); print_r(square(3.4));

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.00718.63
8.3.50.0110.00317.99
8.3.40.0110.00418.49
8.3.30.0180.00418.67
8.3.20.0150.00020.23
8.3.10.0070.00022.14
8.3.00.0000.00822.45
8.2.180.0110.01118.43
8.2.170.0090.00622.96
8.2.160.0100.00322.12
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00319.77
8.2.110.0070.01022.27
8.2.100.0080.00317.91
8.2.90.0030.00718.94
8.2.80.0050.00319.52
8.2.70.0040.00418.04
8.2.60.0110.00018.16
8.2.50.0030.00618.10
8.2.40.0060.00319.33
8.2.30.0000.00719.24
8.2.20.0070.00018.02
8.2.10.0050.00219.46
8.2.00.0040.00419.11
8.1.280.0090.01225.92
8.1.270.0000.00822.46
8.1.260.0030.00526.35
8.1.250.0060.00328.09
8.1.240.0100.00023.96
8.1.230.0120.00319.02
8.1.220.0040.00417.75
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0000.00817.10
8.1.180.0040.00418.10
8.1.170.0080.00018.58
8.1.160.0050.00318.75
8.1.150.0000.00718.80
8.1.140.0000.00722.04
8.1.130.0030.00319.94
8.1.120.0020.00517.28
8.1.110.0040.00417.32
8.1.100.0000.00817.28
8.1.90.0030.00317.32
8.1.80.0040.00417.31
8.1.70.0040.00417.31
8.1.60.0040.00417.34
8.1.50.0070.00017.34
8.1.40.0090.00017.32
8.1.30.0030.00617.62
8.1.20.0000.00917.54
8.1.10.0030.00517.49
8.1.00.0040.00417.41
8.0.300.0080.00019.78
8.0.290.0000.00816.63
8.0.280.0000.00818.38
8.0.270.0000.00717.12
8.0.260.0030.00320.09
8.0.250.0000.00816.88
8.0.240.0030.00317.00
8.0.230.0050.00216.91
8.0.220.0000.00716.77
8.0.210.0080.00016.85
8.0.200.0030.00316.90
8.0.190.0000.00816.96
8.0.180.0050.00216.92
8.0.170.0000.00916.86
8.0.160.0020.00516.84
8.0.150.0050.00216.83
8.0.140.0040.00416.80
8.0.130.0000.00613.23
8.0.120.0000.00916.88
8.0.110.0000.00816.84
8.0.100.0030.00516.79
8.0.90.0000.00816.91
8.0.80.0140.00016.84
8.0.70.0050.00316.77
8.0.60.0030.00616.95
8.0.50.0000.00716.83
8.0.30.0030.01317.18
8.0.20.0090.01017.23
8.0.10.0050.00316.98
8.0.00.0200.00316.67
7.4.330.0000.00515.55
7.4.320.0000.00716.45
7.4.300.0030.00316.61
7.4.290.0030.00316.50
7.4.280.0050.00316.49
7.4.270.0070.00016.29
7.4.260.0000.00613.16
7.4.250.0000.00716.34
7.4.240.0040.00316.48
7.4.230.0030.00316.63
7.4.220.0030.00316.48
7.4.210.0010.01316.55
7.4.200.0040.00416.33
7.4.130.0070.01016.43
7.4.120.0100.00716.32
7.4.110.0120.00616.37
7.4.100.0040.01916.57
7.4.90.0130.00316.55
7.4.80.0120.00719.39
7.4.70.0110.01116.42
7.4.60.0030.01316.39
7.4.50.0040.01516.16
7.4.40.0060.01016.12
7.4.00.0070.01015.04
7.3.330.0000.00716.36
7.3.320.0000.00513.28
7.3.310.0000.00716.39
7.3.300.0000.00616.36
7.3.290.0040.00416.23
7.3.280.0040.01116.29
7.3.260.0120.00816.58
7.3.240.0080.00916.50
7.3.230.0100.00716.32
7.3.210.0140.00316.50
7.3.200.0090.00916.65
7.3.190.0060.01216.55
7.3.180.0100.00716.36
7.3.170.0000.01716.39
7.3.160.0130.00916.49
7.3.100.0070.00714.52
7.3.90.0050.00914.25
7.3.80.0070.00714.27
7.3.70.0050.01314.23
7.3.60.0090.00914.48
7.3.50.0070.01014.72
7.3.40.0080.00514.46
7.3.30.0090.00414.57
7.3.20.0430.01214.73
7.3.10.0360.00614.17
7.3.00.0360.00714.92
7.2.330.0110.00616.59
7.2.320.0200.00016.67
7.2.310.0100.00716.64
7.2.300.0110.00816.33
7.2.290.0090.00916.63
7.2.220.0110.00414.55
7.2.210.0070.00714.54
7.2.200.0090.00614.48
7.2.190.0450.00014.91
7.2.180.0090.00914.55
7.2.170.0080.00814.46
7.2.160.0120.00314.98
7.2.150.0260.00814.82
7.2.140.0730.01314.69
7.2.130.0410.00614.90
7.2.120.0390.00614.77
7.2.110.0490.00714.89
7.2.100.0400.00314.96
7.2.90.0430.00315.06
7.2.80.0400.01014.75
7.2.70.0040.01714.91
7.2.60.0380.00714.91
7.2.50.0410.00614.82
7.2.40.0350.00914.90
7.2.30.0400.00614.99
7.2.20.0370.00915.09
7.2.10.0420.00315.05
7.2.00.0390.00714.78
7.1.320.0240.01013.50
7.1.310.0420.00313.30
7.1.300.0150.01213.43
7.1.290.0340.01013.21
7.1.280.0430.00713.72
7.1.270.0390.00813.79
7.1.260.0310.01213.99
7.1.250.0400.00313.75

preferences:
72.09 ms | 401 KiB | 5 Q