3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $sms = "You make me go crazy, crazy in love for you! :* made some changes to the program so testing it on u :P <3 u baby!!!"; echo strlen($sms) . "\n"; while(strlen($sms) > 160) { echo "Here\n"; $short = substr($sms,0,159); echo "Send SMS Long: " . strlen($short) . "\n" ; $sms = str_replace($short,'',$sms); echo $short . "\n"; } if(strlen($sms) > 0) { echo "Send SMS Short: " . strlen($sms) . "\n"; echo $sms . "\n"; } ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
115 Send SMS Short: 115 You make me go crazy, crazy in love for you! :* made some changes to the program so testing it on u :P <3 u baby!!!