3v4l.org

run code in 300+ PHP versions simultaneously
<?php $offset = strtotime('2000-01-01 00:00:00') * 1000; $time1 = floor(microtime(true) * 1000) - $offset; sleep(1); $time2 = floor(microtime(true) * 1000) - $offset; sleep(1); $time3 = floor(microtime(true) * 1000) - $offset; var_dump(sprintf('%b', $time1)); var_dump(sprintf('%b', $time2)); var_dump(sprintf('%b', $time3)); $datacenter = 1; $machine = 1; $sequence = 1; $id1 = 1 << 63 | $time1 << 22 | $datacenter << 17 | $machine << 12 | $sequence; $id2 = 1 << 63 | $time2 << 22 | $datacenter << 17 | $machine << 12 | $sequence; $id3 = 1 << 63 | $time3 << 22 | $datacenter << 17 | $machine << 12 | $sequence; var_dump(sprintf('%b', $id1)); var_dump(sprintf('%b', $id2)); var_dump(sprintf('%b', $id3)); function bin2base64($entier) { $entier = dechex($entier); $entier = hex2bin($entier); $entier = base64_encode($entier); $entier = str_replace('=', '', $entier); return $entier; } $id1 = bin2base64($id1); $id2 = bin2base64($id2); $id3 = bin2base64($id3); var_dump($id1); var_dump($id2); var_dump($id3);

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.100.0330.01337.54
8.2.100.0280.01018.44
8.2.90.0220.00818.44
8.2.80.0210.00918.44
8.2.70.0430.00418.44
8.2.60.0290.00618.44
8.2.50.0190.01118.44
8.2.40.0180.00918.44
8.2.30.0270.00018.44
8.2.20.0230.00618.44
8.2.10.0160.01218.44
8.2.00.0170.01018.44
8.1.230.0230.00418.44
8.1.220.0280.00018.44
8.1.210.0210.00618.44
8.1.200.0150.01218.44
8.1.190.0090.00319.14
8.1.180.0200.00618.44
8.1.170.0230.00318.44
8.1.160.0260.00018.44
8.1.150.0210.00418.44
8.1.140.0200.00818.44
8.1.130.0230.01018.44
8.1.120.0210.00818.44
8.1.110.0270.00018.44
8.1.100.0270.00018.44
8.1.90.0200.00818.44
8.1.80.0280.00018.44
8.1.70.0240.00418.44
8.1.60.0210.00718.44
8.1.50.0190.00818.44
8.1.40.0290.00018.44
8.1.30.0290.00018.44
8.1.20.0260.00318.44
8.1.10.0240.00518.44
8.1.00.0240.00018.44
8.0.300.0230.00718.44
8.0.290.0230.00618.44
8.0.280.0230.00518.44
8.0.270.0260.00318.44
8.0.260.0250.00318.44
8.0.250.0150.01218.44
8.0.240.0280.00618.44
8.0.230.0200.00918.44
8.0.220.0230.00518.44
8.0.210.0240.00418.44
8.0.200.0190.00918.44
8.0.190.0180.01118.44
8.0.180.0140.01418.44
8.0.170.0200.00718.44
8.0.160.0170.01218.44
8.0.150.0190.00718.44
8.0.140.0220.00318.44
8.0.130.0190.00418.44
8.0.120.0240.00318.44
8.0.110.0330.00018.44
8.0.100.0260.00418.44
8.0.90.0200.00818.44
8.0.80.0190.01018.44
8.0.70.0170.01118.44
8.0.60.0220.00618.44
8.0.50.0250.00318.44
8.0.30.0270.00318.44
8.0.20.0200.00818.44
8.0.10.0280.00018.44
8.0.00.0240.00318.44
7.4.330.0170.00318.44
7.4.320.0230.00418.44
7.4.300.0260.00018.44
7.4.290.0190.00618.44
7.4.280.0170.00818.44
7.4.270.0240.00318.44
7.4.260.0160.01018.44
7.4.250.0190.00818.44
7.4.240.0270.00018.44
7.4.230.0280.00518.44
7.4.220.0270.00018.44
7.4.210.0220.00418.44
7.4.200.0220.00418.44
7.4.190.0100.01518.44
7.4.180.0230.00418.44
7.4.160.0190.00618.44
7.4.150.0190.00718.44
7.4.140.0180.00718.44
7.4.130.0200.00318.90
7.4.120.0190.00418.44
7.4.110.0230.00418.44
7.4.100.0200.00618.44
7.4.90.0260.00018.44
7.4.80.0210.00619.42
7.4.70.0260.00018.44
7.4.60.0250.00018.44
7.4.50.0220.00318.44
7.4.40.0220.00318.44
7.4.30.0210.00418.44
7.4.20.0170.00417.43
7.4.10.0190.00217.34
7.4.00.0140.00817.54
7.3.330.0220.00318.44
7.3.320.0220.00418.44
7.3.310.0180.00718.44
7.3.300.0220.00318.44
7.3.290.0160.00918.44
7.3.280.0160.01018.44
7.3.270.0210.00418.44
7.3.260.0130.01318.44
7.3.250.0360.00618.44
7.3.240.0240.00418.44
7.3.230.0200.00518.44
7.3.220.0190.00518.44
7.3.210.0270.00018.44
7.3.200.0210.00418.44
7.3.190.0280.00418.44
7.3.180.0260.00318.44
7.3.170.0180.01118.44
7.3.160.0400.00018.44
7.3.150.0280.00418.44
7.3.140.0220.00418.44
7.3.130.0160.00617.53
7.3.120.0170.00717.62
7.3.110.0130.01017.58
7.3.100.0150.00617.49
7.3.90.0140.00917.42
7.3.80.0160.00718.19
7.3.70.0130.00917.56
7.3.60.0160.00517.51
7.3.50.0120.00917.54
7.3.40.0160.00417.54
7.3.30.0170.00717.54
7.3.20.0180.00717.98
7.3.10.0150.00717.90
7.3.00.0170.00417.86
7.2.340.0190.00618.44
7.2.330.0180.00918.44
7.2.320.0220.00318.44
7.2.310.0210.00318.44
7.2.300.0250.00018.44
7.2.290.0210.00518.44
7.2.280.0220.00418.44
7.2.270.0180.00718.44
7.2.260.0130.00917.58
7.2.250.0130.01117.72
7.2.240.0170.00817.61
7.2.230.0230.00317.48
7.2.220.0200.00317.50
7.2.210.0150.00617.54
7.2.200.0160.00617.60
7.2.190.0140.00917.55
7.2.180.0170.01017.57
7.2.170.0120.01017.54
7.2.160.0160.00617.50
7.2.150.0190.00618.04
7.2.140.0150.00818.11
7.2.130.0110.01018.18
7.2.120.0150.00818.16
7.2.110.0200.00318.03
7.2.100.0190.00518.09
7.2.90.0110.00817.98
7.2.80.0140.01117.94
7.2.70.0140.00917.95
7.2.60.0130.01118.09
7.2.50.0130.01118.24
7.2.40.0140.00818.31
7.2.30.0150.01020.03
7.2.20.0460.00917.09
7.2.10.0390.01017.13
7.2.00.0350.00617.14
7.1.330.0080.01117.09
7.1.320.0100.01117.37
7.1.310.0180.00317.18
7.1.300.0150.00617.10
7.1.290.0150.00617.15
7.1.280.0180.00517.07
7.1.270.0200.00817.11
7.1.260.0130.01017.17
7.1.250.0160.00417.04
7.1.240.0150.00417.08
7.1.230.0150.00617.18
7.1.220.0170.00317.16
7.1.210.0150.01017.03
7.1.200.0140.00817.09
7.1.190.0170.00517.21
7.1.180.0150.00617.04
7.1.170.0110.01117.05
7.1.160.0130.00817.16
7.1.150.0120.00817.07
7.1.140.0370.00815.96
7.1.130.0210.00716.12
7.1.120.0460.00716.03
7.1.110.0460.00616.17
7.1.100.0410.00716.01
7.1.90.0490.00416.06
7.1.80.0380.00816.02
7.1.70.0430.00416.02
7.1.60.0460.00722.08
7.1.50.0420.01122.12
7.1.40.0230.00922.09
7.1.30.0380.01022.79
7.1.20.0440.00522.00
7.1.10.0300.01216.03
7.1.00.0340.00916.06
7.0.330.0190.00516.96
7.0.320.0120.01018.29
7.0.310.0170.00616.91
7.0.300.0110.00916.84
7.0.290.0140.00716.88
7.0.280.0180.00416.90
7.0.270.0160.00716.92
7.0.260.0170.00316.98
7.0.250.0090.01216.90
7.0.240.0130.00616.94
7.0.230.0140.00517.02
7.0.220.0160.00717.05
7.0.210.0110.00816.98
7.0.200.0150.00817.00
7.0.190.0150.00516.96
7.0.180.0170.00817.00
7.0.170.0100.01216.92
7.0.160.0140.00616.99
7.0.150.0150.00717.02
7.0.140.0150.00416.97
7.0.130.0130.00616.90
7.0.120.0160.00616.96
7.0.110.0160.00616.99
7.0.100.0110.01216.96
7.0.90.0180.00516.87
7.0.80.0150.00416.95
7.0.70.0120.00716.89
7.0.60.0170.00516.93
7.0.50.0210.00616.96
7.0.40.0200.00416.98
7.0.30.0190.01316.90
7.0.20.0150.00916.91
7.0.10.0210.00616.86
7.0.00.0230.00817.01
5.6.400.0160.00617.15
5.6.390.0090.00917.31
5.6.380.0040.01517.30
5.6.370.0130.00417.37
5.6.360.0110.00517.37
5.6.350.0080.00717.38
5.6.340.0120.00417.23
5.6.330.0090.00917.26
5.6.320.0070.01117.33
5.6.310.0100.00517.22
5.6.300.0030.01217.13
5.6.290.0090.00917.26
5.6.280.0120.00617.29
5.6.270.0110.00517.11
5.6.260.0080.00817.21
5.6.250.0090.00717.24
5.6.240.0050.01017.22
5.6.230.0100.00517.12
5.6.220.0120.00517.24
5.6.210.0100.00717.27
5.6.200.0080.00717.24
5.6.190.0090.00917.23
5.6.180.0050.01017.21
5.6.170.0180.00817.16
5.6.160.0170.00417.22
5.6.150.0140.00917.12
5.6.140.0130.01017.26
5.6.130.0160.00817.28
5.6.120.0170.00417.35
5.6.110.0120.00817.22
5.6.100.0180.00717.26
5.6.90.0150.00817.25
5.6.80.0140.00617.30
5.6.70.0190.00217.20
5.6.60.0150.00517.16
5.6.50.0100.01017.17
5.6.40.0140.00917.22
5.6.30.0160.00717.14
5.6.20.0080.01117.11
5.6.10.0150.00817.20
5.6.00.0130.00917.15

preferences:
52.87 ms | 403 KiB | 5 Q