3v4l.org

run code in 300+ PHP versions simultaneously
<?php $name1 = 'no_gravity'; $name2 = 'n0_gr4v1ty'; function stringDiff($string1, $string2) { $x = str_split($string1); $y = str_split($string2); return array_diff($x, $y); } var_dump(stringDiff($name1, $name2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j4DPr
function name:  (null)
number of ops:  10
compiled vars:  !0 = $name1, !1 = $name2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'no_gravity'
    4     1        ASSIGN                                                   !1, 'n0_gr4v1ty'
   13     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'stringdiff'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function stringdiff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j4DPr
function name:  stringDiff
number of ops:  16
compiled vars:  !0 = $string1, !1 = $string2, !2 = $x, !3 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        INIT_FCALL                                               'str_split'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !2, $4
    9     6        INIT_FCALL                                               'str_split'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !3, $6
   10    10        INIT_FCALL                                               'array_diff'
         11        SEND_VAR                                                 !2
         12        SEND_VAR                                                 !3
         13        DO_ICALL                                         $8      
         14      > RETURN                                                   $8
   11    15*     > RETURN                                                   null

End of function stringdiff

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.14 ms | 1398 KiB | 20 Q