3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = 'a:3:{ i:0;a:4: {s:8:"min_days";s:1:"1";s:8:"max_days";s:1:"1";s:10:"range_cost";s:2:"340";s:15:"cost_applicable";s:5:"fixed";} i:1;a:4: {s:8:"min_days";s:1:"2";s:8:"max_days";s:1:"2";s:10:"range_cost";s:2:"450";s:15:"cost_applicable";s:5:"fixed";} i:2;a:4: {s:8:"min_days";s:1:"3";s:8:"max_days";s:1:"3";s:10:"range_cost";s:2:"570";s:15:"cost_applicable";s:5:"fixed";}}'; $data = str_replace("\n", "", $data); $fixed_data = preg_replace_callback ( '!s:(\d+):"(.*?)";!', function($match) { return ($match[1] == strlen($match[2])) ? $match[0] : 's:' . strlen($match[2]) . ':"' . $match[2] . '";'; }, $data ); print_r(unserialize($fixed_data));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a2Q22
function name:  (null)
number of ops:  18
compiled vars:  !0 = $data, !1 = $fixed_data
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'a%3A3%3A%7B%0Ai%3A0%3Ba%3A4%3A%0A%7Bs%3A8%3A%22min_days%22%3Bs%3A1%3A%221%22%3Bs%3A8%3A%22max_days%22%3Bs%3A1%3A%221%22%3Bs%3A10%3A%22range_cost%22%3Bs%3A2%3A%22340%22%3Bs%3A15%3A%22cost_applicable%22%3Bs%3A5%3A%22fixed%22%3B%7D%0Ai%3A1%3Ba%3A4%3A%0A%7Bs%3A8%3A%22min_days%22%3Bs%3A1%3A%222%22%3Bs%3A8%3A%22max_days%22%3Bs%3A1%3A%222%22%3Bs%3A10%3A%22range_cost%22%3Bs%3A2%3A%22450%22%3Bs%3A15%3A%22cost_applicable%22%3Bs%3A5%3A%22fixed%22%3B%7D%0Ai%3A2%3Ba%3A4%3A%0A%7Bs%3A8%3A%22min_days%22%3Bs%3A1%3A%223%22%3Bs%3A8%3A%22max_days%22%3Bs%3A1%3A%223%22%3Bs%3A10%3A%22range_cost%22%3Bs%3A2%3A%22570%22%3Bs%3A15%3A%22cost_applicable%22%3Bs%3A5%3A%22fixed%22%3B%7D%7D'
   11     1        FRAMELESS_ICALL_3                str_replace         ~3      '%0A', ''
          2        OP_DATA                                                      !0
          3        ASSIGN                                                       !0, ~3
   12     4        INIT_FCALL                                                   'preg_replace_callback'
          5        SEND_VAL                                                     '%21s%3A%28%5Cd%2B%29%3A%22%28.%2A%3F%29%22%3B%21'
          6        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
   14     7        SEND_VAL                                                     ~5
          8        SEND_VAR                                                     !0
   12     9        DO_ICALL                                             $6      
         10        ASSIGN                                                       !1, $6
   16    11        INIT_FCALL                                                   'print_r'
         12        INIT_FCALL                                                   'unserialize'
         13        SEND_VAR                                                     !1
         14        DO_ICALL                                             $8      
         15        SEND_VAR                                                     $8
         16        DO_ICALL                                                     
         17      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a2Q22
function name:  {closure:/in/a2Q22:12}
number of ops:  19
compiled vars:  !0 = $match
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   RECV                                                 !0      
   13     1        FETCH_DIM_R                                          ~1      !0, 1
          2        FETCH_DIM_R                                          ~2      !0, 2
          3        STRLEN                                               ~3      ~2
          4        IS_EQUAL                                                     ~1, ~3
          5      > JMPZ                                                         ~4, ->9
          6    >   FETCH_DIM_R                                          ~5      !0, 0
          7        QM_ASSIGN                                            ~6      ~5
          8      > JMP                                                          ->17
          9    >   FETCH_DIM_R                                          ~7      !0, 2
         10        STRLEN                                               ~8      ~7
         11        CONCAT                                               ~9      's%3A', ~8
         12        CONCAT                                               ~10     ~9, '%3A%22'
         13        FETCH_DIM_R                                          ~11     !0, 2
         14        CONCAT                                               ~12     ~10, ~11
         15        CONCAT                                               ~13     ~12, '%22%3B'
         16        QM_ASSIGN                                            ~6      ~13
         17    > > RETURN                                                       ~6
   14    18*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
174.34 ms | 2293 KiB | 16 Q