3v4l.org

run code in 300+ PHP versions simultaneously
<?php $versions = [ '1', '1.0.2.4', '1.1.0', '1.12.547.8' ]; $pad = strlen( max( explode( '.', implode('.', $versions) ) ) ); var_export( preg_replace_callback( '/\d+/', fn($m) => sprintf("%0{$pad}d", $m[0]), $versions ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sNh72
function name:  (null)
number of ops:  25
compiled vars:  !0 = $versions, !1 = $pad
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'max'
   12     2        INIT_FCALL                                               'explode'
   13     3        SEND_VAL                                                 '.'
   14     4        INIT_FCALL                                               'implode'
          5        SEND_VAL                                                 '.'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
   12     9        DO_ICALL                                         $4      
   14    10        SEND_VAR                                                 $4
   11    11        DO_ICALL                                         $5      
   14    12        STRLEN                                           ~6      $5
   10    13        ASSIGN                                                   !1, ~6
   19    14        INIT_FCALL                                               'var_export'
   20    15        INIT_FCALL                                               'preg_replace_callback'
   21    16        SEND_VAL                                                 '%2F%5Cd%2B%2F'
   22    17        DECLARE_LAMBDA_FUNCTION                          ~8      [0]
         18        BIND_LEXICAL                                             ~8, !1
         19        SEND_VAL                                                 ~8
   23    20        SEND_VAR                                                 !0
   20    21        DO_ICALL                                         $9      
   23    22        SEND_VAR                                                 $9
   19    23        DO_ICALL                                                 
   25    24      > 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/sNh72
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $m, !1 = $pad
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_FCALL                                               'sprintf'
          3        ROPE_INIT                                     3  ~3      '%250'
          4        ROPE_ADD                                      1  ~3      ~3, !1
          5        ROPE_END                                      2  ~2      ~3, 'd'
          6        SEND_VAL                                                 ~2
          7        FETCH_DIM_R                                      ~5      !0, 0
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                         $6      
         10      > RETURN                                                   $6
         11*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.86 ms | 1017 KiB | 19 Q