3v4l.org

run code in 300+ PHP versions simultaneously
<?php _cbt_webform_crop_str('sdg sdfg sgd',3); function _cbt_webform_crop_str($string, $limit) { if (strlen($string) >= $limit) { $substring_limited = substr($string, 0, $limit); return substr($substring_limited, 0, strrpos($substring_limited, ‘ ‘ )); } else { //Если количество символов строки меньше чем задано, то просто возращаем оригинал return $string; } }
Output for 5.4.0 - 5.4.12, 5.4.14
Parse error: syntax error, unexpected '‘' (T_STRING) in tUIcP on line 9
Process exited with code 255.
Output for 5.4.13
Parse error: syntax error, unexpected '‘' (T_STRING) in /in/BAZhr on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.22, 5.3.24
Parse error: syntax error, unexpected T_STRING in tUIcP on line 9
Process exited with code 255.
Output for 5.3.23
Parse error: syntax error, unexpected T_STRING in /in/BAZhr on line 9
Process exited with code 255.

preferences:
178.59 ms | 1395 KiB | 47 Q