3v4l.org

run code in 300+ PHP versions simultaneously
<?php $applicant_person_id='44265, 442657, 224585'; // Replace any non-integer at the end by space, then trim it. $cleanstring = preg_replace("/[^0-9]+$/", "", $applicant_person_id); $person_id_list = rtrim($cleanstring); var_dump($person_id_list); // Split on any non-integer value $person_ids = preg_split("/[^0-9]+/", $person_id_list); var_dump($person_ids);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nl3FI
function name:  (null)
number of ops:  23
compiled vars:  !0 = $applicant_person_id, !1 = $cleanstring, !2 = $person_id_list, !3 = $person_ids
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '44265%2C+442657%2C+224585'
    4     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5B%5E0-9%5D%2B%24%2F'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    5     7        INIT_FCALL                                               'rtrim'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !2, $7
    6    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
    8    14        INIT_FCALL                                               'preg_split'
         15        SEND_VAL                                                 '%2F%5B%5E0-9%5D%2B%2F'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $10     
         18        ASSIGN                                                   !3, $10
   11    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:
157.31 ms | 1395 KiB | 21 Q