Created
September 5, 2012 14:59
-
-
Save bkw/3637907 to your computer and use it in GitHub Desktop.
Demo of more strangeness with pecl-amqp and print_r
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Demo { | |
function __construct($conn) { | |
$this->someProperty = 'foobar'; | |
$this->channel = new AMQPChannel($conn); | |
} | |
} | |
$conn = new AMQPConnection(); | |
$conn->connect(); | |
print_r(new AMQPChannel($conn)); | |
print_r(new Demo($conn)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AMQPChannel takes over the Demo Object (notice the missing property $someProperty). Also take a look at these values... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AMQPChannel Object | |
( | |
[channel_id] => 1 | |
[prefetch_count] => 3 | |
[prefetch_size] => 0 | |
) | |
Demo Object | |
( | |
[channel_id] => -810281877 | |
[prefetch_count] => 57 | |
[prefetch_size] => 0 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment