3v4l.org

run code in 300+ PHP versions simultaneously
<?php // http://gathering.tweakers.net/forum/list_message/41881215#41881215 function foo($string1, $string2) { /* Retourneert true dan en slechts dan wanneer de twee argumenten strings zijn en het eerste argument lexicografisch kleiner is. */ return is_string($string1) && is_string($string2) && $string1 < $string2; } var_dump( foo(1,2), foo('1','2'), foo('a','b'), foo('b','a'), foo('ab','ab'), foo('abc','ab') );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QfpfU
function name:  (null)
number of ops:  33
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'var_dump'
   16     1        INIT_FCALL                                               'foo'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 2
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
   17     6        INIT_FCALL                                               'foo'
          7        SEND_VAL                                                 '1'
          8        SEND_VAL                                                 '2'
          9        DO_FCALL                                      0  $1      
         10        SEND_VAR                                                 $1
   18    11        INIT_FCALL                                               'foo'
         12        SEND_VAL                                                 'a'
         13        SEND_VAL                                                 'b'
         14        DO_FCALL                                      0  $2      
         15        SEND_VAR                                                 $2
   19    16        INIT_FCALL                                               'foo'
         17        SEND_VAL                                                 'b'
         18        SEND_VAL                                                 'a'
         19        DO_FCALL                                      0  $3      
         20        SEND_VAR                                                 $3
   20    21        INIT_FCALL                                               'foo'
         22        SEND_VAL                                                 'ab'
         23        SEND_VAL                                                 'ab'
         24        DO_FCALL                                      0  $4      
         25        SEND_VAR                                                 $4
   21    26        INIT_FCALL                                               'foo'
         27        SEND_VAL                                                 'abc'
         28        SEND_VAL                                                 'ab'
         29        DO_FCALL                                      0  $5      
         30        SEND_VAR                                                 $5
         31        DO_ICALL                                                 
   22    32      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
Branch analysis from position: 6
filename:       /in/QfpfU
function name:  foo
number of ops:  11
compiled vars:  !0 = $string1, !1 = $string2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        TYPE_CHECK                                   64  ~2      !0
          3      > JMPZ_EX                                          ~2      ~2, ->6
          4    >   TYPE_CHECK                                   64  ~3      !1
          5        BOOL                                             ~2      ~3
          6    > > JMPZ_EX                                          ~2      ~2, ->9
          7    >   IS_SMALLER                                       ~4      !0, !1
          8        BOOL                                             ~2      ~4
          9    > > RETURN                                                   ~2
   13    10*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.51 ms | 1394 KiB | 21 Q