3v4l.org

run code in 300+ PHP versions simultaneously
<?php function floorDiff(string $input): int { if ($input === '(') { return 1; } if ($input === ')') { return -1; } } assert(floorDiff('(') === 1); assert(floorDiff(')') === -1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KFSL2
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSERT_CHECK                                             
          1        INIT_FCALL                                               'assert'
          2        INIT_FCALL                                               'floordiff'
          3        SEND_VAL                                                 '%28'
          4        DO_FCALL                                      0  $0      
          5        IS_IDENTICAL                                     ~1      $0, 1
          6        SEND_VAL                                                 ~1
          7        SEND_VAL                                                 'assert%28floorDiff%28%27%28%27%29+%3D%3D%3D+1%29'
          8        DO_ICALL                                                 
   13     9        ASSERT_CHECK                                             
         10        INIT_FCALL                                               'assert'
         11        INIT_FCALL                                               'floordiff'
         12        SEND_VAL                                                 '%29'
         13        DO_FCALL                                      0  $3      
         14        IS_IDENTICAL                                     ~4      $3, -1
         15        SEND_VAL                                                 ~4
         16        SEND_VAL                                                 'assert%28floorDiff%28%27%29%27%29+%3D%3D%3D+-1%29'
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function floordiff:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KFSL2
function name:  floorDiff
number of ops:  9
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        IS_IDENTICAL                                             !0, '%28'
          2      > JMPZ                                                     ~1, ->4
    5     3    > > RETURN                                                   1
    7     4    >   IS_IDENTICAL                                             !0, '%29'
          5      > JMPZ                                                     ~2, ->7
    8     6    > > RETURN                                                   -1
   10     7    >   VERIFY_RETURN_TYPE                                       
          8      > RETURN                                                   null

End of function floordiff

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.64 ms | 1399 KiB | 17 Q