3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Tasodifiy kod generatsiya qiluvchi funksiya function generateFormattedCode() { // Harflar va raqamlar to'plami $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); // Format: CUBE-XXX-XXXX-XXXX-XXX $formattedCode = 'CUBE-'; // 3 ta belgini generatsiya qilish for ($i = 0; $i < 3; $i++) { $formattedCode .= $characters[rand(0, $charactersLength - 1)]; } $formattedCode .= '-'; // 4 ta belgini generatsiya qilish for ($i = 0; $i < 4; $i++) { $formattedCode .= $characters[rand(0, $charactersLength - 1)]; } $formattedCode .= '-'; // Yana 4 ta belgini generatsiya qilish for ($i = 0; $i < 4; $i++) { $formattedCode .= $characters[rand(0, $charactersLength - 1)]; } $formattedCode .= '-'; // Oxirgi 3 ta belgini generatsiya qilish for ($i = 0; $i < 3; $i++) { $formattedCode .= $characters[rand(0, $charactersLength - 1)]; } return $formattedCode; } // Bir necha o'yin kodi generatsiya qilish function generateMultipleCodes($count) { $codes = []; // $count miqdorida kod yaratish for ($i = 0; $i < $count; $i++) { $codes[] = generateFormattedCode(); } return $codes; } // 10 ta kod generatsiya qilish $gameCodes = generateMultipleCodes(10); // Natijani ko'rsatish foreach ($gameCodes as $code) { echo $code . PHP_EOL; } ?>

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.120.0400.00316.45
8.3.110.0330.00616.43
8.3.100.0270.00316.43
8.3.90.0170.00716.63
8.3.80.0320.00816.50
8.3.70.0280.00416.64
8.3.60.0290.00316.29
8.3.50.0140.01116.41
8.3.40.0160.01117.24
8.3.30.0370.00017.53
8.3.20.0240.00617.70
8.3.10.0300.01017.55
8.3.00.0150.01217.46
8.2.240.0350.00716.64
8.2.230.0310.00616.05
8.2.220.0300.00716.19
8.2.210.0330.00716.47
8.2.200.0360.00716.68
8.2.190.0320.00716.33
8.2.180.0230.01016.29
8.2.170.0260.00917.52
8.2.160.0310.00617.63
8.2.150.0260.00917.75
8.2.140.0220.01317.53
8.2.130.0230.00317.64
8.2.120.0370.00017.55
8.2.110.0290.00717.47
8.2.100.0320.00617.27
8.2.90.0250.01217.47
8.2.80.0310.00917.34
8.2.70.0370.00417.38
8.2.60.0300.01517.39
8.2.50.0450.00017.55
8.2.40.0270.01417.42
8.2.30.0270.01217.31
8.2.20.0280.01117.48
8.2.10.0360.00317.28
8.2.00.0290.00817.46
8.1.300.0380.00716.14
8.1.290.0340.00916.02
8.1.280.0170.00715.93
8.1.270.0320.01117.23
8.1.260.0190.01916.99
8.1.250.0360.00717.14
8.1.240.0280.01217.19
8.1.230.0320.00617.32
8.1.220.0290.00817.06
8.1.210.0290.01117.16
8.1.200.0210.01517.30
8.1.190.0330.00517.01
8.1.180.0360.00417.11
8.1.170.0140.01717.21
8.1.160.0310.00717.05
8.1.150.0260.01117.25
8.1.140.0330.00517.20
8.1.130.0300.00817.08
8.1.120.0250.01217.07
8.1.110.0370.00017.28
8.1.100.0350.00417.12
8.1.90.0320.00917.23
8.1.80.0320.00617.20
8.1.70.0390.00617.06
8.1.60.0440.00717.31
8.1.50.0350.01117.26
8.1.40.0330.01517.06
8.1.30.0270.00317.36
8.1.20.0160.00317.45
8.1.10.0290.00817.34
8.1.00.0320.00317.16

preferences:
26.22 ms | 403 KiB | 5 Q