3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(PHP_INT_MAX); function explodeTrim($delimiter, $string, $limit = 0x7FFFFFF) { // About explode() and PHP_INT_MAX // http://php.net/manual/en/function.explode.php return explode($delimiter, $string, $limit); // further custom logic } $emails = 'test1@example.com, test2@example.com'; $emailsArr = explodeTrim(',', $emails); // using default limit=PHP_INT_MAX var_dump($emailsArr); var_dump(explode(',', $emails));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5q7IG
function name:  (null)
number of ops:  20
compiled vars:  !0 = $emails, !1 = $emailsArr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 9223372036854775807
          2        DO_ICALL                                                 
   15     3        ASSIGN                                                   !0, 'test1%40example.com%2C+test2%40example.com'
   16     4        INIT_FCALL                                               'explodetrim'
          5        SEND_VAL                                                 '%2C'
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0  $4      
          8        ASSIGN                                                   !1, $4
   18     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   19    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'explode'
         14        SEND_VAL                                                 '%2C'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $7      
         17        SEND_VAR                                                 $7
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Function explodetrim:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5q7IG
function name:  explodeTrim
number of ops:  10
compiled vars:  !0 = $delimiter, !1 = $string, !2 = $limit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      134217727
   10     3        INIT_FCALL                                               'explode'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $3      
          8      > RETURN                                                   $3
   13     9*     > RETURN                                                   null

End of function explodetrim

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.8 ms | 1403 KiB | 18 Q