3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $lot_num = strtoupper('e1,1,2,3,4,5,7,8,9,10,11,12,13,14,15,16,17,18,e18'); echo 'END UNIT: '.substr_count($lot_num, 'E'); Echo '\ntotal count: '. count(explode(",", $lot_num)); Echo '\nother count: '. count(explode(",", $lot_num))-intval(substr_count($lot_num, 'E'));
based on aHDjM
Output for 7.1.0 - 7.3.0alpha1
END UNIT: 2\ntotal count: 19 Warning: A non-numeric value encountered in /in/V6kkX on line 7 -2
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.0.20
END UNIT: 2\ntotal count: 19-2