3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "foo.domain.com"; $m = "domain.com"; var_dump(substr_compare($str, $m, -strlen($m), strlen($m)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FktUk
function name:  (null)
number of ops:  15
compiled vars:  !0 = $str, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'foo.domain.com'
    4     1        ASSIGN                                                   !1, 'domain.com'
    6     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'substr_compare'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        STRLEN                                           ~4      !1
          7        MUL                                              ~5      ~4, -1
          8        SEND_VAL                                                 ~5
          9        STRLEN                                           ~6      !1
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $7      
         12        SEND_VAR                                                 $7
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.56 ms | 1394 KiB | 17 Q