I am not sure how this happens on your server. I had to make assumptions about the MiddlewareTest class, change the class names and add some simple debugging lines, but with this code:
<?php abstract class MiddlewareTest {
I get the following results:
37: array ( 0 => 'Power', 1 => 'power', 2 => 1000, ) 20: array ( 0 => 'Power', 1 => 'power', 2 => 1000, ) 21: array ( 0 => 'Power', 1 => 'power', 2 => 1000, ) 39: 'array ( 0 => \'Power\', 1 => \'power\', 2 => 1000, )'
As you can see, the values ββappear to be passed in the same way as they are defined in the instance class, as expected.
Can you give some information about your MiddlewareTest class, which may shed light on why you might experience this behavior?
What version of php are you using?
source share