3v4l.org

run code in 300+ PHP versions simultaneously
<?php string_lt('22', '123'); function string_lt($str1, $str2) { # you can't use < operator for comparing strings # wacky stuff will happen $lt_says = ((string) $str1 < (string) $str2); # see what strcmp() says $strcmp_says = strcmp($str1, $str2); echo "lt_says: $lt_says, strcmp_says: $strcmp_says\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g0a2n
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'string_lt'
          1        SEND_VAL_EX                                              '22'
          2        SEND_VAL_EX                                              '123'
          3        DO_FCALL                                      0          
   16     4      > RETURN                                                   1

Function string_lt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g0a2n
function name:  string_lt
number of ops:  18
compiled vars:  !0 = $str1, !1 = $str2, !2 = $lt_says, !3 = $strcmp_says
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        CAST                                          6  ~4      !0
          3        CAST                                          6  ~5      !1
          4        IS_SMALLER                                       ~6      ~4, ~5
          5        ASSIGN                                                   !2, ~6
   13     6        INIT_FCALL                                               'strcmp'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !3, $8
   15    11        ROPE_INIT                                     5  ~11     'lt_says%3A+'
         12        ROPE_ADD                                      1  ~11     ~11, !2
         13        ROPE_ADD                                      2  ~11     ~11, '%2C+strcmp_says%3A+'
         14        ROPE_ADD                                      3  ~11     ~11, !3
         15        ROPE_END                                      4  ~10     ~11, '%0A'
         16        ECHO                                                     ~10
   16    17      > RETURN                                                   null

End of function string_lt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.49 ms | 1395 KiB | 15 Q