3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_array = array("Sandra Loor,593984076233","Adrian,593998016010","Lucas,593999843424"); $to_remove = array("593984076233","593998016010"); $to_remove = "/" . implode("|", $to_remove) . "/"; $match = preg_grep($to_remove, $my_array); $filtered = array_diff($my_array, $match); var_dump($filtered);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PZ4I6
function name:  (null)
number of ops:  23
compiled vars:  !0 = $my_array, !1 = $to_remove, !2 = $match, !3 = $filtered
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'implode'
          3        SEND_VAL                                                 '%7C'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        CONCAT                                           ~7      '%2F', $6
          7        CONCAT                                           ~8      ~7, '%2F'
          8        ASSIGN                                                   !1, ~8
    7     9        INIT_FCALL                                               'preg_grep'
         10        SEND_VAR                                                 !1
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !2, $10
    8    14        INIT_FCALL                                               'array_diff'
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $12     
         18        ASSIGN                                                   !3, $12
   10    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.65 ms | 1005 KiB | 17 Q