3v4l.org

run code in 300+ PHP versions simultaneously
<?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'));

preferences:
41.53 ms | 402 KiB | 5 Q