3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string1 = "abcdefg"; $string2 = "abcfghi"; $position = strspn($string1 ^ $string2, "\0"); echo $position;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fOIST
function name:  (null)
number of ops:  10
compiled vars:  !0 = $string1, !1 = $string2, !2 = $position
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'abcdefg'
    4     1        ASSIGN                                                   !1, 'abcfghi'
    5     2        INIT_FCALL                                               'strspn'
          3        BW_XOR                                           ~5      !0, !1
          4        SEND_VAL                                                 ~5
          5        SEND_VAL                                                 '%00'
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
    6     8        ECHO                                                     !2
          9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.19 ms | 1394 KiB | 15 Q