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'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V6kkX
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        ECHO                                                     ~4
    6    10        INIT_FCALL                                               'explode'
         11        SEND_VAL                                                 '%2C'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $5      
         14        COUNT                                            ~6      $5
         15        CONCAT                                           ~7      '%5Cntotal+count%3A+', ~6
         16        ECHO                                                     ~7
    7    17        INIT_FCALL                                               'explode'
         18        SEND_VAL                                                 '%2C'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $8      
         21        COUNT                                            ~9      $8
         22        INIT_FCALL                                               'substr_count'
         23        SEND_VAR                                                 !0
         24        SEND_VAL                                                 'E'
         25        DO_ICALL                                         $10     
         26        CAST                                          4  ~11     $10
         27        SUB                                              ~12     ~9, ~11
         28        CONCAT                                           ~13     '%5Cnother+count%3A+', ~12
         29        ECHO                                                     ~13
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.74 ms | 1387 KiB | 19 Q