3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tiaErrorCodeObject = (object) array( 'tiaError' => 'ORA-12345: Some error occurred', ); if (!empty($tiaErrorCodeObject->tiaError) && false !== strpos($tiaErrorCodeObject->tiaError, 'ORA-')) { $tiaError = trim($tiaErrorCodeObject->tiaError); $split = strpos($tiaError, ':'); $tiaErrorCode = (int)substr($tiaError, 4, $split - 1); $tiaErrorDescription = substr($tiaError, $split + 1, strlen($tiaError)); var_dump($tiaErrorCode); var_dump($tiaErrorDescription); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 45
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 45
Branch analysis from position: 12
filename:       /in/ef04Z
function name:  (null)
number of ops:  46
compiled vars:  !0 = $tiaErrorCodeObject, !1 = $tiaError, !2 = $split, !3 = $tiaErrorCode, !4 = $tiaErrorDescription
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   CAST                                          8  ~5      <array>
    3     1        ASSIGN                                                   !0, ~5
    7     2        ISSET_ISEMPTY_PROP_OBJ                           ~7      !0, 'tiaError'
          3        BOOL_NOT                                         ~8      ~7
          4      > JMPZ_EX                                          ~8      ~8, ->12
          5    >   INIT_FCALL                                               'strpos'
          6        FETCH_OBJ_R                                      ~9      !0, 'tiaError'
          7        SEND_VAL                                                 ~9
          8        SEND_VAL                                                 'ORA-'
          9        DO_ICALL                                         $10     
         10        TYPE_CHECK                                  1018  ~11     $10
         11        BOOL                                             ~8      ~11
         12    > > JMPZ                                                     ~8, ->45
    8    13    >   INIT_FCALL                                               'trim'
         14        FETCH_OBJ_R                                      ~12     !0, 'tiaError'
         15        SEND_VAL                                                 ~12
         16        DO_ICALL                                         $13     
         17        ASSIGN                                                   !1, $13
   10    18        INIT_FCALL                                               'strpos'
         19        SEND_VAR                                                 !1
         20        SEND_VAL                                                 '%3A'
         21        DO_ICALL                                         $15     
         22        ASSIGN                                                   !2, $15
   11    23        INIT_FCALL                                               'substr'
         24        SEND_VAR                                                 !1
         25        SEND_VAL                                                 4
         26        SUB                                              ~17     !2, 1
         27        SEND_VAL                                                 ~17
         28        DO_ICALL                                         $18     
         29        CAST                                          4  ~19     $18
         30        ASSIGN                                                   !3, ~19
   12    31        INIT_FCALL                                               'substr'
         32        SEND_VAR                                                 !1
         33        ADD                                              ~21     !2, 1
         34        SEND_VAL                                                 ~21
         35        STRLEN                                           ~22     !1
         36        SEND_VAL                                                 ~22
         37        DO_ICALL                                         $23     
         38        ASSIGN                                                   !4, $23
   14    39        INIT_FCALL                                               'var_dump'
         40        SEND_VAR                                                 !3
         41        DO_ICALL                                                 
   15    42        INIT_FCALL                                               'var_dump'
         43        SEND_VAR                                                 !4
         44        DO_ICALL                                                 
   16    45    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.39 ms | 1400 KiB | 21 Q