3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = "<><><"; $open = substr_count($test,'<'); $close = substr_count($test,'>'); if($open > $close){ echo $open . "-" . $close; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/Et5vv
function name:  (null)
number of ops:  17
compiled vars:  !0 = $test, !1 = $open, !2 = $close
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3E%3C%3E%3C'
    4     1        INIT_FCALL                                               'substr_count'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%3C'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    5     6        INIT_FCALL                                               'substr_count'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 '%3E'
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    7    11        IS_SMALLER                                               !2, !1
         12      > JMPZ                                                     ~8, ->16
    8    13    >   CONCAT                                           ~9      !1, '-'
         14        CONCAT                                           ~10     ~9, !2
         15        ECHO                                                     ~10
    9    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.71 ms | 1394 KiB | 15 Q