3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str1="the cat is on the roof"; $str2="the mouse is on the roof"; $array_1 = explode(" ", $str1); $array_2 = explode(" ", $str2); echo count(array_diff($array_1, $array_2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mJhYh
function name:  (null)
number of ops:  19
compiled vars:  !0 = $str1, !1 = $str2, !2 = $array_1, !3 = $array_2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'the+cat+is+on+the+roof'
    3     1        ASSIGN                                                   !1, 'the+mouse+is+on+the+roof'
    4     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '+'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    5     7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '+'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !3, $8
    6    12        INIT_FCALL                                               'array_diff'
         13        SEND_VAR                                                 !2
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                         $10     
         16        COUNT                                            ~11     $10
         17        ECHO                                                     ~11
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.58 ms | 1394 KiB | 17 Q