3v4l.org

run code in 300+ PHP versions simultaneously
<?php //the original array $a = array( 'a23' => 'abcdefg hij' ); //make it serial $s = serialize($a); //just to see the serial string var_dump($s); //the serialized array $s1 = 'a:1:{s:3:"a23";s:11:"abcdefg hij";}'; //the same with linux line end character $s2 = "a:1:{s:3:\"a23\";s:11:\"abcdefg\12hij\";}"; //the same with windows line end character, same I had in my PEAR files $s3 = "a:1:{s:3:\"a23\";s:11:\"abcdefg\15\12hij\";}"; //turn it back to an array $a1 = unserialize($s1); // ok $a2 = unserialize($s2); // ok $a3 = unserialize($s3); // not ok
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X0pFQ
function name:  (null)
number of ops:  24
compiled vars:  !0 = $a, !1 = $s, !2 = $s1, !3 = $s2, !4 = $s3, !5 = $a1, !6 = $a2, !7 = $a3
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   QM_ASSIGN                                                !0
   9     1        INIT_FCALL                                               'serialize'
         2        SEND_VAR                                                 !0
         3        DO_ICALL                                         $9      
         4        QM_ASSIGN                                                !1
  11     5        INIT_FCALL                                               'var_dump'
         6        SEND_VAR                                                 !1
         7        DO_ICALL                                                 
  13     8        QM_ASSIGN                                                !2
  16     9        QM_ASSIGN                                                !3
  18    10        QM_ASSIGN                                                !4
  20    11        INIT_FCALL                                               'unserialize'
        12        SEND_VAR                                                 !2
        13        DO_ICALL                                         $15     
        14        QM_ASSIGN                                                !5
  21    15        INIT_FCALL                                               'unserialize'
        16        SEND_VAR                                                 !3
        17        DO_ICALL                                         $17     
        18        QM_ASSIGN                                                !6
  22    19        INIT_FCALL                                               'unserialize'
        20        SEND_VAR                                                 !4
        21        DO_ICALL                                         $19     
        22        QM_ASSIGN                                                !7
        23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
14.28 ms | 461 KiB | 7 Q