3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Активируем утверждение и переводим в тихий режим assert_options(ASSERT_ACTIVE, 1); assert_options(ASSERT_WARNING, 0); assert_options(ASSERT_QUIET_EVAL, 1); // Создаем обработчик function my_assert_handler($file, $line, $code, $desc = null) { echo "Проверка завершилась неудачей в $file:$line: $code"; if ($desc) { echo ": $desc"; } echo "\n"; } // Задаем callback-функцию assert_options(ASSERT_CALLBACK, 'my_assert_handler'); // Спровоцируем ошибку для проверки assert('2 < 1'); assert('2 < 1', 'Два меньше одного');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aR9oB
function name:  (null)
number of ops:  28
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'assert_options'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 1
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'assert_options'
          5        SEND_VAL                                                 4
          6        SEND_VAL                                                 0
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'assert_options'
          9        FETCH_CONSTANT                                   ~2      'ASSERT_QUIET_EVAL'
         10        SEND_VAL                                                 ~2
         11        SEND_VAL                                                 1
         12        DO_ICALL                                                 
   18    13        INIT_FCALL                                               'assert_options'
         14        SEND_VAL                                                 2
         15        SEND_VAL                                                 'my_assert_handler'
         16        DO_ICALL                                                 
   21    17        ASSERT_CHECK                                             
         18        INIT_FCALL                                               'assert'
         19        SEND_VAL                                                 '2+%3C+1'
         20        SEND_VAL                                                 'assert%28%272+%3C+1%27%29'
         21        DO_ICALL                                                 
   22    22        ASSERT_CHECK                                             
         23        INIT_FCALL                                               'assert'
         24        SEND_VAL                                                 '2+%3C+1'
         25        SEND_VAL                                                 '%D0%94%D0%B2%D0%B0+%D0%BC%D0%B5%D0%BD%D1%8C%D1%88%D0%B5+%D0%BE%D0%B4%D0%BD%D0%BE%D0%B3%D0%BE'
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Function my_assert_handler:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/aR9oB
function name:  my_assert_handler
number of ops:  17
compiled vars:  !0 = $file, !1 = $line, !2 = $code, !3 = $desc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV_INIT                                        !3      null
   10     4        ROPE_INIT                                     6  ~5      '%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0+%D0%B7%D0%B0%D0%B2%D0%B5%D1%80%D1%88%D0%B8%D0%BB%D0%B0%D1%81%D1%8C+%D0%BD%D0%B5%D1%83%D0%B4%D0%B0%D1%87%D0%B5%D0%B9+%D0%B2+'
          5        ROPE_ADD                                      1  ~5      ~5, !0
          6        ROPE_ADD                                      2  ~5      ~5, '%3A'
          7        ROPE_ADD                                      3  ~5      ~5, !1
          8        ROPE_ADD                                      4  ~5      ~5, '%3A+'
          9        ROPE_END                                      5  ~4      ~5, !2
         10        ECHO                                                     ~4
   11    11      > JMPZ                                                     !3, ->15
   12    12    >   NOP                                                      
         13        FAST_CONCAT                                      ~8      '%3A+', !3
         14        ECHO                                                     ~8
   14    15    >   ECHO                                                     '%0A'
   15    16      > RETURN                                                   null

End of function my_assert_handler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.69 ms | 1405 KiB | 17 Q