3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $nbOcc = 10000000; //10 millions $aToSort = ['W7', 'Y9', 'K6', 'E1', 'T8', 'L5', 'X3', 'F1', 'P7', 'K1', 'R2', 'Y0', 'D7', 'N0', 'V5', 'L9', 'H3', 'O9', 'F8', 'E2', 'R5', 'T5', 'B1', 'J7', 'X8', 'M2', 'X8', 'N2', 'N7', 'B0', 'F5', 'J4', 'E7', 'O8', 'F5', 'C9', 'A6', 'E6', 'D8', 'B5', 'T0', 'H9', 'M3', 'E4', 'B4', 'Y6', 'G5', 'Y8', 'Z0', 'F3', 'A0', 'I8', 'K0', 'S2', 'L6', 'Y8', 'S0', 'B9', 'E9', 'H5', 'M8', 'E8', 'H8', 'Y3', 'E2', 'F6', 'H8', 'O9', 'M2', 'T9', 'D2', 'I1', 'Z0', 'L7', 'K4', 'U6', 'K6', 'P3', 'K8', 'Y3', 'M5', 'C6', 'Y2', 'J0', 'L7', 'H3', 'I0', 'G9', 'V5', 'E0', 'Q9', 'H0', 'W2', 'G2', 'K1', 'L8', 'M8', 'K0', 'S5', 'J3', 'B7', 'O3', 'Q0', 'Z0', 'G8', 'C5', 'C5', 'Z8', 'I9', 'N2', 'K2', 'R1', 'F4', 'O9', 'H8', 'D4', 'U3', 'S3', 'C5', 'J6', 'A3', 'V4', 'L2', 'O6', 'D3', 'I2', 'O2', 'C8', 'Y5', 'C9', 'W3', 'F2', 'R8', 'X9', 'E4', 'Z8', 'A4', 'B5', 'F5', 'L4', 'S1', 'O7', 'Z9', 'D5', 'Y6', 'U3', 'K5', 'R1', 'C0', 'G6', 'C5', 'Z8', 'B8', 'X0', 'A1', 'X9', 'W4', 'U9', 'Y9', 'I9', 'P0', 'S1', 'D3', 'P6', 'L7', 'G9', 'T6', 'P9', 'G1', 'Q6', 'L3', 'X3', 'L4', 'F6', 'U9', 'C2', 'L1', 'V1', 'U5', 'R3', 'J0', 'J7', 'B7', 'E9', 'T1', 'K7', 'U7', 'L8', 'E0', 'P2', 'Y6', 'C6', 'A2', 'O1', 'S4', 'V2', 'N4', 'V8', 'V0', 'Y4', 'K4', 'V3', 'Z3', 'H1', 'M7', 'O3', 'Z9', 'L1', 'Q8', 'A2', 'S5', 'U6', 'M5', 'C0', 'V4', 'T9', 'F6', 'D7', 'J9', 'K4', 'A0', 'Y3', 'E4', 'V6', 'B4', 'H1', 'W6', 'L9', 'W0', 'W2', 'W7', 'W3', 'L3', 'V1', 'Q1', 'F0', 'D1', 'C4', 'O4', 'I3', 'E6', 'W8', 'B2', 'O8', 'R3', 'C9', 'S6', 'V3', 'I8', 'V7', 'N9', 'L9', 'N1', 'I6', 'J7', 'M2', 'T8', 'Y4', 'Q1', 'P9', 'V8', 'W4', 'J7', 'Z3', 'K7', 'F0', 'M8', 'R0', 'P4', 'Z3', 'Y8', 'T1', 'W1', 'U0', 'E9', 'G0', 'X9', 'P4', 'V2', 'A4', 'E9', 'E6', 'H0', 'U8', 'L9', 'C6', 'R3', 'W3', 'K1', 'J9', 'E2', 'Q5', 'W8', 'G8', 'G6', 'F8', 'A1', 'J1', 'V3', 'B8', 'F8', 'T4', 'I2', 'J7', 'X1', 'U9', 'L4', 'L1', 'J9', 'S6', 'O4', 'Y0', 'P1', 'E0', 'P8', 'W9', 'P0', 'J2', 'T4', 'Y7', 'C2', 'L2', 'V2', 'U6', 'X8', 'W8', 'W2', 'W2', 'A4', 'G4', 'W5', 'M6', 'X6', 'U5', 'Y1', 'F9', 'D9', 'K2', 'R9', 'X2', 'O6', 'C0', 'S1', 'D6', 'X2', 'Q9', 'K9', 'H4', 'D8', 'M9', 'C0', 'A0', 'N9', 'H6', 'F2', 'K5', 'E8', 'I4', 'U3', 'Z0', 'F6', 'V1', 'Q6', 'B1', 'W7', 'H4', 'S8', 'R9', 'G6', 'W3', 'E8', 'S9', 'A0', 'F0', 'W6', 'Y6', 'E3', 'P7', 'Q9', 'K6', 'C5', 'X0', 'L1', 'R3', 'R8', 'M6', 'S1', 'L6', 'S1', 'Z9', 'A0', 'S8', 'I3', 'R8', 'O2', 'V0', 'B7', 'Q8', 'Y3', 'J8', 'D9', 'T3', 'F5', 'K9', 'U7', 'F0', 'R4', 'G6', 'G8', 'X1', 'D8', 'W5', 'F5', 'W1', 'A4', 'Y8', 'X1', 'R6', 'U0', 'H3', 'P1', 'E7', 'E3', 'P9', 'J5', 'O9', 'H3', 'T0', 'L1', 'G7', 'T6', 'J8', 'C9', 'Z9', 'D4', 'V5', 'V6', 'I6', 'I1', 'J3', 'M9', 'U7', 'Q3', 'P9', 'X3', 'V5', 'Z9', 'A9', 'Z2', 'P0', 'A5', 'P3', 'U4', 'K5', 'Y1', 'S3', 'O9', 'R2', 'O6', 'I2', 'R1', 'B6', 'A3', 'H5', 'T3', 'D7', 'T2', 'S0', 'D9', 'X7', 'S9', 'M5', 'L2', 'W3', 'N9', 'S9', 'I6', 'U6', 'J4', 'C5', 'D6', 'P1', 'E4', 'Y0', 'V5', 'J1', 'O4', 'Y2', 'H1', 'I8', 'F6', 'S5', 'Q8', 'U6', 'P1', 'H9', 'T5', 'I6', 'F5', 'R6', 'Y3', 'F9', 'L8', 'B3', 'K5', 'G7', 'T7', 'R7', 'M9', 'Y0', 'O3', 'P7', 'R4', 'A7', 'P8', 'K9', 'R2', 'W7', 'Q0', 'U9', 'I7', 'C4', 'V6', 'W6', 'K9', 'O6', 'M0', 'K8', 'U6', 'G2', 'Q9', 'G9', 'I5', 'P6', 'M3', 'P8', 'W0', 'I9', 'V6', 'Z6', 'D5', 'N3', 'I1', 'J4', 'D0', 'S0', 'E0', 'E8', 'D4', 'I5', 'N1', 'V3', 'X0', 'B2', 'R9', 'P7', 'V7', 'X8', 'L4', 'U9', 'B5', 'C7', 'Y8', 'U6', 'R3', 'A9', 'V9', 'F7', 'K4', 'F7', 'F2', 'Q3', 'E8', 'I3', 'F6', 'B3', 'Y4', 'J9', 'B9', 'N6', 'R6', 'C2', 'N5', 'J6', 'L1', 'P1', 'Y2', 'V7', 'X4', 'H2', 'A8', 'M7', 'K8', 'M0', 'Y5', 'O0', 'G2', 'I3', 'X8', 'W3', 'C8', 'S6', 'F1', 'A7', 'J6', 'E4', 'H1', 'X3', 'A3', 'N4', 'D7', 'A9', 'B4', 'I4', 'Q5', 'M7', 'A7', 'O8', 'J0', 'R9', 'M7', 'D4', 'W4', 'S6', 'Q4', 'S3', 'X6', 'I3', 'S4', 'L9', 'T5', 'G4', 'X6', 'S5', 'O9', 'O7', 'P2', 'Z1', 'T0', 'D8', 'C4', 'W5', 'P4', 'F3', 'U4', 'T8', 'H6', 'I0', 'W4', 'D7', 'T3', 'T8', 'E7', 'S9', 'G9', 'W9', 'U1', 'M7', 'V5', 'U8', 'N1', 'D0', 'V7', 'M0', 'N0', 'E1', 'H5', 'G3', 'N6', 'D1', 'G3', 'U3', 'W5', 'C0', 'K8', 'Z9', 'V3', 'D0', 'J9', 'J0', 'Z4', 'W6', 'I2', 'H0', 'B9', 'T4', 'Q0', 'F8', 'M4', 'G8', 'O4', 'Z2', 'N7', 'O7', 'M9', 'H0', 'R0', 'I9', 'H3', 'B5', 'M9', 'G2', 'A1', 'L7', 'R5', 'P3', 'H6', 'S5', 'E4', 'D3', 'T5', 'U4', 'A9', 'H7', 'I0', 'Q8', 'U6', 'F5', 'Q9', 'M7', 'H7', 'C5', 'J8', 'F7', 'R2', 'T2', 'S8', 'O3', 'I7', 'K4', 'P8', 'Z8', 'Y1', 'O7', 'J3', 'Q7', 'T5', 'K6', 'Y8', 'N1', 'L9', 'B0', 'J0', 'W1', 'O3', 'B3', 'E1', 'S3', 'B5', 'Y7', 'C5', 'A4', 'C3', 'V2', 'R6', 'L4', 'A3', 'X3', 'O0', 'Y0', 'V8', 'H1', 'Y5', 'X9', 'O0', 'D0', 'D3', 'A5', 'O1', 'G8', 'P7', 'J2', 'D7', 'D5', 'O6', 'P3', 'M1', 'T5', 'O2', 'L3', 'Q0', 'X5', 'B0', 'Z7', 'Q5', 'P0', 'P6', 'D5', 'Q7', 'M7', 'T6', 'P8', 'T9', 'U7', 'C1', 'N0', 'R1', 'W3', 'F5', 'S1', 'D1', 'R3', 'F6', 'X9', 'D1', 'O7', 'G3', 'Y4', 'I5', 'W6', 'S8', 'M7', 'S7', 'I9', 'P5', 'B6', 'M6', 'F7', 'B7', 'V0', 'P4', 'B5', 'P5', 'V8', 'E1', 'H4', 'B0', 'P8', 'W4', 'E1', 'I0', 'B3', 'H9', 'L7', 'O7', 'X8', 'X5', 'U6', 'Q1', 'H5', 'H6', 'O6', 'C6', 'C5', 'G5', 'T7', 'L3', 'H9', 'V6', 'U1', 'G7', 'R6', 'J7', 'U0', 'W8', 'Q8', 'H9', 'Z8', 'B7', 'R2', 'U3', 'Y9', 'Q6', 'R3', 'P9', 'M7', 'D6', 'C5', 'X5', 'Q3', 'J0', 'V4', 'M6', 'U9', 'Y3', 'J9', 'C2', 'C0', 'B1', 'K6', 'O8', 'R2', 'T6', 'F0', 'D0', 'W0', 'X1', 'V3', 'A6', 'H5', 'Z5', 'W4', 'R0', 'Z3', 'M2', 'Z9', 'N8', 'Y4', 'R2', 'C7', 'V8', 'F1', 'K3', 'Z3', 'C8', 'Q3', 'I9', 'L7', 'S2', 'A7', 'R2', 'H6', 'F8', 'Z4', 'W5', 'C4', 'U0', 'L5', 'L8', 'N0', 'V2', 'Q6', 'C1', 'G6', 'J3', 'P9', 'N4', 'W0', 'C3', 'W8', 'R2', 'A8', 'P4', 'R5', 'O1', 'G4', 'W0', 'F7', 'F8', 'L5', 'M5', 'Q7', 'T0', 'J9', 'M8', 'X2', 'Z9', 'I9', 'H0', 'Q9', 'O1', 'H9', 'A6', 'B8', 'U2', 'R6', 'H9', 'M5', 'X4', 'Y2', 'F2', 'Q7', 'W1', 'T3', 'B1', 'G7', 'U8', 'E4', 'E2', 'M3', 'U3', 'V2', 'B2', 'Z9', 'D9', 'G7', 'V8', 'Z9', 'L3', 'H6', 'M8', 'R4', 'S3', 'U8', 'R3', 'W1', 'H8', 'Z4', 'N8', 'Q1', 'F6', 'I9', 'F2', 'Y1', 'U0', 'C1', 'B4', 'K3', 'F4', 'C6']; $i=0; $start = microtime(true); for ($i=0; $i<$nbOcc; ++$i) { natsort($aToSort); } $end = microtime(true); echo 'Usage of 10.000.000 of natsort: ' . ($end-$start) . ' seconds.'; $start = microtime(true); for ($i=0; $i<$nbOcc; ++$i) { sort($aToSort, SORT_NATURAL); } $end = microtime(true); echo 'Usage of 10.000.000 of sort with flag SORT_NATURAL: ' . ($end-$start) . ' seconds.';

Abusive script

This script was stopped while abusing our resources

Output for 5.6.0 - 5.6.30, hhvm-3.12.14 - 3.17.3, 7.0.0 - 7.1.2

Process exited with code 137.