3v4l.org

run code in 300+ PHP versions simultaneously
<?php use Amp\MultiProcess\PhpDispatcher, Amp\MultiProcess\CallResult, Amp\ReactorFactory; require dirname(__DIR__) . '/autoload.php'; require __DIR__ . '/support_files/async_mailer/MyAsyncMailer.php'; $reactor = (new ReactorFactory)->select(); $include = __DIR__ . '/support_files/async_mailer/StaticMailWorker.php'; $dispatcher = new PhpDispatcher($reactor, $include, $workerProcessesToSpawn = 8); $mailer = new MyAsyncMailer($dispatcher); $mailJobs = [ [$to ='test1@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]], [$to ='test2@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]], [$to ='test3@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]], [$to ='test4@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]], [$to ='test5@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]], [$to ='test6@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]], [$to ='test7@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]], [$to ='test8@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]] ]; // Kick things off when the reactor starts $reactor->once(function() use ($mailer, $mailJobs) { $mailer->dispatch($mailJobs); }); // Release the hounds! This should always be the last thing that happens in the script. $reactor->run();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ArmdI
function name:  (null)
number of ops:  121
compiled vars:  !0 = $reactor, !1 = $include, !2 = $dispatcher, !3 = $workerProcessesToSpawn, !4 = $mailer, !5 = $mailJobs, !6 = $to, !7 = $from, !8 = $subject, !9 = $body, !10 = $headers
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'dirname'
          1        SEND_VAL                                                 '%2Fin'
          2        DO_ICALL                                         $11     
          3        CONCAT                                           ~12     $11, '%2Fautoload.php'
          4        INCLUDE_OR_EVAL                                          ~12, REQUIRE
    8     5        INCLUDE_OR_EVAL                                          '%2Fin%2Fsupport_files%2Fasync_mailer%2FMyAsyncMailer.php', REQUIRE
   10     6        NEW                                              $15     'Amp%5CReactorFactory'
          7        DO_FCALL                                      0          
          8        INIT_METHOD_CALL                                         $15, 'select'
          9        DO_FCALL                                      0  $17     
         10        ASSIGN                                                   !0, $17
   11    11        ASSIGN                                                   !1, '%2Fin%2Fsupport_files%2Fasync_mailer%2FStaticMailWorker.php'
   12    12        NEW                                              $20     'Amp%5CMultiProcess%5CPhpDispatcher'
         13        SEND_VAR_EX                                              !0
         14        SEND_VAR_EX                                              !1
         15        ASSIGN                                           ~21     !3, 8
         16        SEND_VAL_EX                                              ~21
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !2, $20
   14    19        NEW                                              $24     'MyAsyncMailer'
         20        SEND_VAR_EX                                              !2
         21        DO_FCALL                                      0          
         22        ASSIGN                                                   !4, $24
   17    23        ASSIGN                                           ~27     !6, 'test1%40test.com'
         24        INIT_ARRAY                                       ~28     ~27
         25        ASSIGN                                           ~29     !7, 'address%40me.com'
         26        ADD_ARRAY_ELEMENT                                ~28     ~29
         27        ASSIGN                                           ~30     !8, 'my+test'
         28        ADD_ARRAY_ELEMENT                                ~28     ~30
         29        ASSIGN                                           ~31     !9, 'body'
         30        ADD_ARRAY_ELEMENT                                ~28     ~31
         31        ASSIGN                                           ~32     !10, <array>
         32        ADD_ARRAY_ELEMENT                                ~28     ~32
         33        INIT_ARRAY                                       ~33     ~28
   18    34        ASSIGN                                           ~34     !6, 'test2%40test.com'
         35        INIT_ARRAY                                       ~35     ~34
         36        ASSIGN                                           ~36     !7, 'address%40me.com'
         37        ADD_ARRAY_ELEMENT                                ~35     ~36
         38        ASSIGN                                           ~37     !8, 'my+test'
         39        ADD_ARRAY_ELEMENT                                ~35     ~37
         40        ASSIGN                                           ~38     !9, 'body'
         41        ADD_ARRAY_ELEMENT                                ~35     ~38
         42        ASSIGN                                           ~39     !10, <array>
         43        ADD_ARRAY_ELEMENT                                ~35     ~39
         44        ADD_ARRAY_ELEMENT                                ~33     ~35
   19    45        ASSIGN                                           ~40     !6, 'test3%40test.com'
         46        INIT_ARRAY                                       ~41     ~40
         47        ASSIGN                                           ~42     !7, 'address%40me.com'
         48        ADD_ARRAY_ELEMENT                                ~41     ~42
         49        ASSIGN                                           ~43     !8, 'my+test'
         50        ADD_ARRAY_ELEMENT                                ~41     ~43
         51        ASSIGN                                           ~44     !9, 'body'
         52        ADD_ARRAY_ELEMENT                                ~41     ~44
         53        ASSIGN                                           ~45     !10, <array>
         54        ADD_ARRAY_ELEMENT                                ~41     ~45
         55        ADD_ARRAY_ELEMENT                                ~33     ~41
   20    56        ASSIGN                                           ~46     !6, 'test4%40test.com'
         57        INIT_ARRAY                                       ~47     ~46
         58        ASSIGN                                           ~48     !7, 'address%40me.com'
         59        ADD_ARRAY_ELEMENT                                ~47     ~48
         60        ASSIGN                                           ~49     !8, 'my+test'
         61        ADD_ARRAY_ELEMENT                                ~47     ~49
         62        ASSIGN                                           ~50     !9, 'body'
         63        ADD_ARRAY_ELEMENT                                ~47     ~50
         64        ASSIGN                                           ~51     !10, <array>
         65        ADD_ARRAY_ELEMENT                                ~47     ~51
         66        ADD_ARRAY_ELEMENT                                ~33     ~47
   21    67        ASSIGN                                           ~52     !6, 'test5%40test.com'
         68        INIT_ARRAY                                       ~53     ~52
         69        ASSIGN                                           ~54     !7, 'address%40me.com'
         70        ADD_ARRAY_ELEMENT                                ~53     ~54
         71        ASSIGN                                           ~55     !8, 'my+test'
         72        ADD_ARRAY_ELEMENT                                ~53     ~55
         73        ASSIGN                                           ~56     !9, 'body'
         74        ADD_ARRAY_ELEMENT                                ~53     ~56
         75        ASSIGN                                           ~57     !10, <array>
         76        ADD_ARRAY_ELEMENT                                ~53     ~57
         77        ADD_ARRAY_ELEMENT                                ~33     ~53
   22    78        ASSIGN                                           ~58     !6, 'test6%40test.com'
         79        INIT_ARRAY                                       ~59     ~58
         80        ASSIGN                                           ~60     !7, 'address%40me.com'
         81        ADD_ARRAY_ELEMENT                                ~59     ~60
         82        ASSIGN                                           ~61     !8, 'my+test'
         83        ADD_ARRAY_ELEMENT                                ~59     ~61
         84        ASSIGN                                           ~62     !9, 'body'
         85        ADD_ARRAY_ELEMENT                                ~59     ~62
         86        ASSIGN                                           ~63     !10, <array>
         87        ADD_ARRAY_ELEMENT                                ~59     ~63
         88        ADD_ARRAY_ELEMENT                                ~33     ~59
   23    89        ASSIGN                                           ~64     !6, 'test7%40test.com'
         90        INIT_ARRAY                                       ~65     ~64
         91        ASSIGN                                           ~66     !7, 'address%40me.com'
         92        ADD_ARRAY_ELEMENT                                ~65     ~66
         93        ASSIGN                                           ~67     !8, 'my+test'
         94        ADD_ARRAY_ELEMENT                                ~65     ~67
         95        ASSIGN                                           ~68     !9, 'body'
         96        ADD_ARRAY_ELEMENT                                ~65     ~68
         97        ASSIGN                                           ~69     !10, <array>
         98        ADD_ARRAY_ELEMENT                                ~65     ~69
         99        ADD_ARRAY_ELEMENT                                ~33     ~65
   24   100        ASSIGN                                           ~70     !6, 'test8%40test.com'
        101        INIT_ARRAY                                       ~71     ~70
        102        ASSIGN                                           ~72     !7, 'address%40me.com'
        103        ADD_ARRAY_ELEMENT                                ~71     ~72
        104        ASSIGN                                           ~73     !8, 'my+test'
        105        ADD_ARRAY_ELEMENT                                ~71     ~73
        106        ASSIGN                                           ~74     !9, 'body'
        107        ADD_ARRAY_ELEMENT                                ~71     ~74
        108        ASSIGN                                           ~75     !10, <array>
        109        ADD_ARRAY_ELEMENT                                ~71     ~75
        110        ADD_ARRAY_ELEMENT                                ~33     ~71
   16   111        ASSIGN                                                   !5, ~33
   28   112        INIT_METHOD_CALL                                         !0, 'once'
        113        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FArmdI%3A28%240'
        114        BIND_LEXICAL                                             ~77, !4
        115        BIND_LEXICAL                                             ~77, !5
   30   116        SEND_VAL_EX                                              ~77
        117        DO_FCALL                                      0          
   33   118        INIT_METHOD_CALL                                         !0, 'run'
        119        DO_FCALL                                      0          
        120      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FArmdI%3A28%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ArmdI
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $mailer, !1 = $mailJobs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   BIND_STATIC                                              !0
          1        BIND_STATIC                                              !1
   29     2        INIT_METHOD_CALL                                         !0, 'dispatch'
          3        SEND_VAR_EX                                              !1
          4        DO_FCALL                                      0          
   30     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FArmdI%3A28%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150 ms | 1404 KiB | 15 Q