3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'abc-def-ghi::State.32.1.14.16.5:A'; var_export( preg_split( '/(?:[^:]*\K:){3}/', $string ) ); $string = 'def-ghi::yellow:abc::def:B'; var_export( preg_split( '/(?:[^:]*\K:){3}/', $string, 2 # instruct to not explode more than once (limit generated elements to a max of 2) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VO9aS
function name:  (null)
number of ops:  18
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'abc-def-ghi%3A%3AState.32.1.14.16.5%3AA'
    5     1        INIT_FCALL                                                   'var_export'
    6     2        INIT_FCALL                                                   'preg_split'
    7     3        SEND_VAL                                                     '%2F%28%3F%3A%5B%5E%3A%5D%2A%5CK%3A%29%7B3%7D%2F'
    8     4        SEND_VAR                                                     !0
    6     5        DO_ICALL                                             $2      
    8     6        SEND_VAR                                                     $2
    5     7        DO_ICALL                                                     
   12     8        ASSIGN                                                       !0, 'def-ghi%3A%3Ayellow%3Aabc%3A%3Adef%3AB'
   13     9        INIT_FCALL                                                   'var_export'
   14    10        INIT_FCALL                                                   'preg_split'
   15    11        SEND_VAL                                                     '%2F%28%3F%3A%5B%5E%3A%5D%2A%5CK%3A%29%7B3%7D%2F'
   16    12        SEND_VAR                                                     !0
   17    13        SEND_VAL                                                     2
   14    14        DO_ICALL                                             $5      
   17    15        SEND_VAR                                                     $5
   13    16        DO_ICALL                                                     
   19    17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
174.84 ms | 1914 KiB | 14 Q