3v4l.org

run code in 500+ 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'); $ecount = substr_count($lot_num, 'E'); $totcount = count(explode(",", $lot_num)); echo 'END UNIT: '.$ecount; Echo "\ntotal count: ". $totcount; Echo "\nother count: ". Intval($totcount-$ecount);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r6OKl
function name:  (null)
number of ops:  24
compiled vars:  !0 = $lot_num, !1 = $ecount, !2 = $totcount
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                                             $3      
          3        ASSIGN                                                       !0, $3
    4     4        INIT_FCALL                                                   'substr_count'
          5        SEND_VAR                                                     !0
          6        SEND_VAL                                                     'E'
          7        DO_ICALL                                             $5      
          8        ASSIGN                                                       !1, $5
    5     9        INIT_FCALL                                                   'explode'
         10        SEND_VAL                                                     '%2C'
         11        SEND_VAR                                                     !0
         12        DO_ICALL                                             $7      
         13        COUNT                                                ~8      $7
         14        ASSIGN                                                       !2, ~8
    7    15        CONCAT                                               ~10     'END+UNIT%3A+', !1
         16        ECHO                                                         ~10
    8    17        CONCAT                                               ~11     '%0Atotal+count%3A+', !2
         18        ECHO                                                         ~11
    9    19        SUB                                                  ~12     !2, !1
         20        CAST                                              4  ~13     ~12
         21        CONCAT                                               ~14     '%0Aother+count%3A+', ~13
         22        ECHO                                                         ~14
         23      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.57 ms | 2594 KiB | 16 Q