3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str1 = 'The Quick Brown Fox Jumps'; $str2 = 'The Quick Brown Fox JuMps'; echo 'String1-'.$str1.'<br />String2-'.$str2.'<br />'; $spos = strspn($str1 ^ $str2, "\0"); printf('First difference at position %d: "%s" vs "%s"',$spos, $str1[$spos], $str2[$spos]); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8S80i
function name:  (null)
number of ops:  22
compiled vars:  !0 = $str1, !1 = $str2, !2 = $spos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'The+Quick+Brown+Fox+Jumps'
    3     1        ASSIGN                                                   !1, 'The+Quick+Brown+Fox+JuMps'
    4     2        CONCAT                                           ~5      'String1-', !0
          3        CONCAT                                           ~6      ~5, '%3Cbr+%2F%3EString2-'
          4        CONCAT                                           ~7      ~6, !1
          5        CONCAT                                           ~8      ~7, '%3Cbr+%2F%3E'
          6        ECHO                                                     ~8
    5     7        INIT_FCALL                                               'strspn'
          8        BW_XOR                                           ~9      !0, !1
          9        SEND_VAL                                                 ~9
         10        SEND_VAL                                                 '%00'
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !2, $10
    6    13        INIT_FCALL                                               'printf'
         14        SEND_VAL                                                 'First+difference+at+position+%25d%3A+%22%25s%22+vs+%22%25s%22'
         15        SEND_VAR                                                 !2
         16        FETCH_DIM_R                                      ~12     !0, !2
         17        SEND_VAL                                                 ~12
         18        FETCH_DIM_R                                      ~13     !1, !2
         19        SEND_VAL                                                 ~13
         20        DO_ICALL                                                 
    7    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.82 ms | 1395 KiB | 17 Q