3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '[{"hello":"dolly", "bob":{"a":"is your uncle", "b":"is not your uncle"}}]'; var_dump(strlen($str)); var_dump(strlen(pack('*H', $str)));
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.29, 8.2.0 - 8.2.23, 8.3.0 - 8.3.11
int(73) Fatal error: Uncaught ValueError: Type *: unknown format code in /in/lfdi3:4 Stack trace: #0 /in/lfdi3(4): pack('*H', '[{"hello":"doll...') #1 {main} thrown in /in/lfdi3 on line 4
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
int(73) Warning: pack(): Type *: unknown format code in /in/lfdi3 on line 4 int(0)

preferences:
53.59 ms | 408 KiB | 5 Q