3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(str_pad('foo', strlen('bar'), '0', \STR_PAD_LEFT));
based on 9XcVa
Output for 5.3.0 - 7.1.0
string(3) "foo"
Output for 4.3.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/5pG33 on line 2 string(3) "foo"