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').'\ntotal count: '. count(explode(",", $lot_num)) . '\nother count: '. count(explode(",", $lot_num))-intval(substr_count($lot_num, 'E'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aHDjM
function name:  (null)
number of ops:  31
compiled vars:  !0 = $lot_num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtoupper'
          1        SEND_VAL                                                 'e1%2C1%2C2%2C3%2C4%2C5%2C7%2C8%2C9%2C10%2C11%2C12%2C13%2C14%2C15%2C16%2C17%2C18%2Ce18'
          2        DO_ICALL                                         $1      
          3        ASSIGN                                                   !0, $1
    5     4        INIT_FCALL                                               'substr_count'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'E'
          7        DO_ICALL                                         $3      
          8        CONCAT                                           ~4      'END+UNIT%3A+', $3
          9        CONCAT                                           ~5      ~4, '%5Cntotal+count%3A+'
         10        INIT_FCALL                                               'explode'
         11        SEND_VAL                                                 '%2C'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $6      
         14        COUNT                                            ~7      $6
         15        CONCAT                                           ~8      ~5, ~7
         16        CONCAT                                           ~9      ~8, '%5Cnother+count%3A+'
         17        INIT_FCALL                                               'explode'
         18        SEND_VAL                                                 '%2C'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $10     
         21        COUNT                                            ~11     $10
         22        INIT_FCALL                                               'substr_count'
         23        SEND_VAR                                                 !0
         24        SEND_VAL                                                 'E'
         25        DO_ICALL                                         $12     
         26        CAST                                          4  ~13     $12
         27        SUB                                              ~14     ~11, ~13
         28        CONCAT                                           ~15     ~9, ~14
         29        ECHO                                                     ~15
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
272.76 ms | 1395 KiB | 20 Q