3v4l.org

run code in 300+ PHP versions simultaneously
<?php function convertVersionId($versionId, $base) { return sprintf( '%d.%d.%d', $versionId / ($base * $base), ($versionId / $base) % $base, $versionId % $base ); } function convertVersionIdFixed($versionId, $base) { return sprintf( '%d.%d.%d', $versionId / ($base * $base), (int) ($versionId / $base) % $base, $versionId % $base ); } var_dump(convertVersionId(30411, 100)); var_dump(convertVersionId(20449, 100)); echo '-----------', PHP_EOL; var_dump(convertVersionIdFixed(30411, 100)); var_dump(convertVersionIdFixed(20449, 100));

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.140.0060.01018.96
8.3.130.0060.00318.58
8.3.120.0130.00719.11
8.3.110.0060.00318.55
8.3.100.0030.00624.06
8.3.90.0070.00326.77
8.3.80.0030.00616.61
8.3.70.0120.00316.88
8.3.60.0060.00918.52
8.3.50.0070.01016.59
8.3.40.0090.00618.89
8.3.30.0060.00918.54
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.250.0080.00016.51
8.2.240.0000.00817.05
8.2.230.0000.00820.94
8.2.220.0050.00337.54
8.2.210.0100.01026.77
8.2.200.0060.00616.38
8.2.190.0100.01016.75
8.2.180.0110.00425.92
8.2.170.0120.00318.99
8.2.160.0100.00722.96
8.2.150.0060.00325.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00020.93
8.2.110.0090.00019.17
8.2.100.0130.00317.72
8.2.90.0040.00417.63
8.2.80.0000.00818.67
8.2.70.0000.00818.05
8.2.60.0050.00318.09
8.2.50.0030.00618.10
8.2.40.0090.00020.79
8.2.30.0070.00019.22
8.2.20.0040.00417.94
8.2.10.0000.00719.18
8.2.00.0040.00419.13
8.1.300.0090.00016.05
8.1.290.0050.00530.84
8.1.280.0030.01225.92
8.1.270.0040.00423.99
8.1.260.0000.00828.09
8.1.250.0080.00028.09
8.1.240.0100.00023.78
8.1.230.0140.00017.57
8.1.220.0080.00017.74
8.1.210.0080.00018.77
8.1.200.0000.01417.23
8.1.190.0000.00917.10
8.1.180.0040.00418.10
8.1.170.0060.00318.58
8.1.160.0040.00418.84
8.1.150.0000.00718.74
8.1.140.0070.00018.84
8.1.130.0000.00820.03
8.1.120.0040.00417.19
8.1.110.0000.00817.25
8.1.100.0000.00717.41
8.1.90.0030.00317.31
8.1.80.0030.00917.40
8.1.70.0070.00017.46
8.1.60.0040.00417.50
8.1.50.0030.00617.36
8.1.40.0030.00717.46
8.1.30.0000.00917.43
8.1.20.0100.00017.55
8.1.10.0040.00417.48
8.1.00.0030.00617.39
8.0.300.0030.00520.00
8.0.290.0040.00416.63
8.0.280.0000.00718.38
8.0.270.0030.00316.84
8.0.260.0030.00318.58
8.0.250.0040.00416.90
8.0.240.0030.00316.74
8.0.230.0030.00416.86
8.0.220.0030.00316.72
8.0.210.0040.00416.75
8.0.200.0030.00316.75
8.0.190.0000.00716.86
8.0.180.0030.00516.76
8.0.170.0080.00016.75
8.0.160.0040.00416.81
8.0.150.0040.00416.74
8.0.140.0040.00416.76
8.0.130.0030.00313.32
8.0.120.0000.00816.77
8.0.110.0040.00416.80
8.0.100.0040.00416.71
8.0.90.0050.00316.72
8.0.80.0120.00416.79
8.0.70.0000.00716.85
8.0.60.0040.00416.84
8.0.50.0070.00016.89
8.0.30.0140.00416.72
8.0.20.0250.00716.93
8.0.10.0220.01316.98
8.0.00.0150.01516.98
7.4.330.0000.00415.55
7.4.320.0000.00616.51
7.4.300.0000.00716.55
7.4.290.0000.00816.31
7.4.280.0000.00716.41
7.4.270.0070.00016.55
7.4.260.0000.00613.15
7.4.250.0070.00016.41
7.4.240.0020.00616.47
7.4.230.0040.00416.38
7.4.220.0030.00416.45
7.4.210.0050.00916.46
7.4.200.0000.00716.63
7.4.160.0160.01616.42
7.4.150.0150.01816.61
7.4.140.0230.00916.48
7.4.130.0220.00916.36
7.4.120.0150.02216.45
7.4.110.0280.00316.41
7.4.100.0250.00716.43
7.4.90.0200.00816.46
7.4.80.0260.00316.43
7.4.70.0180.01016.46
7.4.60.0190.00716.59
7.4.50.0210.00716.25
7.4.40.0210.00716.21
7.4.30.0250.00716.36
7.4.20.0180.01116.50
7.4.10.0220.00616.40
7.4.00.0160.01316.55
7.3.330.0070.00016.22
7.3.320.0030.00313.36
7.3.310.0070.00016.36
7.3.300.0000.00716.29
7.3.290.0050.00916.36
7.3.280.0160.00916.42
7.3.270.0330.00516.34
7.3.260.0150.01516.33
7.3.250.0170.01016.35
7.3.240.0310.00416.33
7.3.230.0250.00416.37
7.3.220.0200.01016.27
7.3.210.0250.01016.31
7.3.200.0230.00716.31
7.3.190.0240.00416.27
7.3.180.0260.00516.32
7.3.170.0080.02316.37
7.3.160.0220.01016.21
7.3.150.0210.01616.29
7.3.140.0290.00616.31
7.3.130.0190.01216.31
7.3.120.0220.00716.21
7.3.110.0120.01116.23
7.3.100.0230.00616.23
7.3.90.0200.00716.44
7.3.80.0280.00416.31
7.3.70.0200.00516.40
7.3.60.0160.01216.52
7.3.50.0230.00416.44
7.3.40.0270.00816.48
7.3.30.0190.01316.48
7.3.20.0220.00616.44
7.3.10.0220.01216.37
7.3.00.0190.01316.41

preferences:
17.06 ms | 403 KiB | 5 Q