3v4l.org

run code in 300+ PHP versions simultaneously
<?php $separator = ' '; $old_string = null; $new_tag = 'ghi'; $tags = explode($separator, $old_string); $diffTags = array_diff($tags, array($new_tag)); var_dump(join($separator, $diffTags) . $separator . $new_tag); var_dump($tags == $diffTags);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0d6S4
function name:  (null)
number of ops:  28
compiled vars:  !0 = $separator, !1 = $old_string, !2 = $new_tag, !3 = $tags, !4 = $diffTags
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '+'
    3     1        ASSIGN                                                   !1, null
    4     2        ASSIGN                                                   !2, 'ghi'
    5     3        INIT_FCALL                                               'explode'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !3, $8
    6     8        INIT_FCALL                                               'array_diff'
          9        SEND_VAR                                                 !3
         10        INIT_ARRAY                                       ~10     !2
         11        SEND_VAL                                                 ~10
         12        DO_ICALL                                         $11     
         13        ASSIGN                                                   !4, $11
    7    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'join'
         16        SEND_VAR                                                 !0
         17        SEND_VAR                                                 !4
         18        DO_ICALL                                         $13     
         19        CONCAT                                           ~14     $13, !0
         20        CONCAT                                           ~15     ~14, !2
         21        SEND_VAL                                                 ~15
         22        DO_ICALL                                                 
    9    23        INIT_FCALL                                               'var_dump'
         24        IS_EQUAL                                         ~17     !3, !4
         25        SEND_VAL                                                 ~17
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.43 ms | 1395 KiB | 21 Q