3v4l.org

run code in 300+ PHP versions simultaneously
<?php $transactionId = "Sok234141341"; $gaClientId = "41233412.31231"; $redisData = $transactionId; $redisData = json_encode([ 'transactionId' => $transactionId, 'gaClientId' => $gaClientId ]); $data = json_decode($redisData); var_dump($data); if (json_last_error() !== JSON_ERROR_NONE) { $data = $redisData; } var_dump($data);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/KIdD3
function name:  (null)
number of ops:  25
compiled vars:  !0 = $transactionId, !1 = $gaClientId, !2 = $redisData, !3 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Sok234141341'
    4     1        ASSIGN                                                   !1, '41233412.31231'
    6     2        ASSIGN                                                   !2, !0
    8     3        INIT_FCALL                                               'json_encode'
    9     4        INIT_ARRAY                                       ~7      !0, 'transactionId'
   10     5        ADD_ARRAY_ELEMENT                                ~7      !1, 'gaClientId'
          6        SEND_VAL                                                 ~7
          7        DO_ICALL                                         $8      
    8     8        ASSIGN                                                   !2, $8
   13     9        INIT_FCALL                                               'json_decode'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !3, $10
   14    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                                 
   15    16        INIT_FCALL                                               'json_last_error'
         17        DO_ICALL                                         $13     
         18        IS_NOT_IDENTICAL                                         $13, 0
         19      > JMPZ                                                     ~14, ->21
   16    20    >   ASSIGN                                                   !3, !2
   19    21    >   INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.33 ms | 1395 KiB | 21 Q