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 stcmp($string1, $string2); 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'), foo('2xx','2yy') );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JvbvY
function name:  (null)
number of ops:  38
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'var_dump'
   17     1        INIT_FCALL                                               'foo'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 2
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
   18     6        INIT_FCALL                                               'foo'
          7        SEND_VAL                                                 '1'
          8        SEND_VAL                                                 '2'
          9        DO_FCALL                                      0  $1      
         10        SEND_VAR                                                 $1
   19    11        INIT_FCALL                                               'foo'
         12        SEND_VAL                                                 'a'
         13        SEND_VAL                                                 'b'
         14        DO_FCALL                                      0  $2      
         15        SEND_VAR                                                 $2
   20    16        INIT_FCALL                                               'foo'
         17        SEND_VAL                                                 'b'
         18        SEND_VAL                                                 'a'
         19        DO_FCALL                                      0  $3      
         20        SEND_VAR                                                 $3
   21    21        INIT_FCALL                                               'foo'
         22        SEND_VAL                                                 'ab'
         23        SEND_VAL                                                 'ab'
         24        DO_FCALL                                      0  $4      
         25        SEND_VAR                                                 $4
   22    26        INIT_FCALL                                               'foo'
         27        SEND_VAL                                                 'abc'
         28        SEND_VAL                                                 'ab'
         29        DO_FCALL                                      0  $5      
         30        SEND_VAR                                                 $5
   23    31        INIT_FCALL                                               'foo'
         32        SEND_VAL                                                 '2xx'
         33        SEND_VAL                                                 '2yy'
         34        DO_FCALL                                      0  $6      
         35        SEND_VAR                                                 $6
         36        DO_ICALL                                                 
   24    37      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JvbvY
function name:  foo
number of ops:  16
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        INIT_FCALL_BY_NAME                                       'stcmp'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $2      
          6      > RETURN                                                   $2
   13     7*       TYPE_CHECK                                   64  ~3      !0
          8*       JMPZ_EX                                          ~3      ~3, ->11
          9*       TYPE_CHECK                                   64  ~4      !1
         10*       BOOL                                             ~3      ~4
         11*       JMPZ_EX                                          ~3      ~3, ->14
         12*       IS_SMALLER                                       ~5      !0, !1
         13*       BOOL                                             ~3      ~5
         14*       RETURN                                                   ~3
   14    15*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.89 ms | 1403 KiB | 22 Q