3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $format = '{%[^:]:%[^}]}}'; var_dump(sscanf('foo', $format, $a, $b), $a, $b); var_dump(sscanf('{foo}', $format, $a, $b), $a, $b); var_dump(sscanf('{foo:bar}', $format, $a, $b), $a, $b);
Output for 4.3.0 - 7.2.0
int(0) NULL NULL int(1) string(4) "foo}" NULL int(2) string(3) "foo" string(3) "bar"