3v4l.org

run code in 300+ PHP versions simultaneously
<?php $address = "House No. 1234-ABC, Second Floor, XYZ Building, ABC Mall Road, Street Number 1234, ABC Area"; $address_length = strlen($address); if ($address_length > 80) { $parts = explode(',', $address); list($address1, $address2) = array_map(function($x) { return trim(implode(',', $x)); }, array_chunk($parts, 3)); echo $address1; echo PHP_EOL; echo $address2; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 27
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/MY1OA
function name:  (null)
number of ops:  28
compiled vars:  !0 = $address, !1 = $address_length, !2 = $parts, !3 = $address1, !4 = $address2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'House+No.+1234-ABC%2C+Second+Floor%2C+XYZ+Building%2C+ABC+Mall+Road%2C+Street+Number+1234%2C+ABC+Area'
    4     1        STRLEN                                           ~6      !0
          2        ASSIGN                                                   !1, ~6
    6     3        IS_SMALLER                                               80, !1
          4      > JMPZ                                                     ~8, ->27
    7     5    >   INIT_FCALL                                               'explode'
          6        SEND_VAL                                                 '%2C'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $9      
          9        ASSIGN                                                   !2, $9
    8    10        INIT_FCALL                                               'array_map'
         11        DECLARE_LAMBDA_FUNCTION                          ~11     [0]
   10    12        SEND_VAL                                                 ~11
         13        INIT_FCALL                                               'array_chunk'
         14        SEND_VAR                                                 !2
         15        SEND_VAL                                                 3
         16        DO_ICALL                                         $12     
         17        SEND_VAR                                                 $12
    8    18        DO_ICALL                                         $13     
   10    19        FETCH_LIST_R                                     $14     $13, 0
    8    20        ASSIGN                                                   !3, $14
         21        FETCH_LIST_R                                     $16     $13, 1
         22        ASSIGN                                                   !4, $16
         23        FREE                                                     $13
   11    24        ECHO                                                     !3
   12    25        ECHO                                                     '%0A'
   13    26        ECHO                                                     !4
   14    27    > > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MY1OA
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'trim'
          2        INIT_FCALL                                               'implode'
          3        SEND_VAL                                                 '%2C'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                         $2      
          8      > RETURN                                                   $2
   10     9*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.77 ms | 1446 KiB | 18 Q