3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $sValue = '50tn2rx'; echo trim($sValue, ' \t\n\r\x0B')."\n"; $sValue = 50; echo trim($sValue, ' \t\n\r\x0B')."\n"; $sValue = 50.0; echo trim($sValue, ' \t\n\r\x0B')."\n"; echo '&&&&&&&&&&&&&'."\n"; $sValue = '50tnrx0B'; echo trim($sValue)."\n"; $sValue = 50; echo trim($sValue)."\n"; $sValue = 50.0; echo trim($sValue)."\n"; echo '&&&&&&&&&&&&&'."\n"; $sValue = '50tnrx0B'; echo trim($sValue, " \t\n\r\x0B")."\n"; $sValue = 50; echo trim($sValue, " \t\n\r\x0B")."\n"; $sValue = 50.0; echo trim($sValue, " \t\n\r\x0B")."\n";
based on UpYnS
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
50tn2 5 5 &&&&&&&&&&&&& 50tnrx0B 50 50 &&&&&&&&&&&&& 50tnrx0B 50 50
Output for hhvm-3.10.0

Process exited with code 153.