Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Test generation of classes with signals and accumulator --SKIPIF-- <?php if (!ext..
Decoded Output download
--TEST--
Test generation of classes with signals and accumulator
--SKIPIF--
<?php if (!extension_loaded("gobject")) print "skip"; ?>
--FILE--
<?php
$accu = function(&$result, $reply) {
$result += $reply;
};
$s1 = new GObject\Signal(0, array(), 'glong', null, $accu);
$type = new GObject\Type;
$type->name = 'test';
$type->parent = 'GObject';
$type->signals['something1'] = $s1;
$type->generate();
$obj = new test;
$obj->signal_connect('something1', function($self) {
return 1;
});
$obj->signal_connect('something1', function($self) {
return 2;
});
$obj->signal_connect('something1', function($self) {
return 3;
});
$result = $obj->emit('something1');
var_dump($result === 6);
?>
==DONE==
--EXPECT--
bool(true)
==DONE==
Did this file decode correctly?
Original Code
--TEST--
Test generation of classes with signals and accumulator
--SKIPIF--
<?php if (!extension_loaded("gobject")) print "skip"; ?>
--FILE--
<?php
$accu = function(&$result, $reply) {
$result += $reply;
};
$s1 = new GObject\Signal(0, array(), 'glong', null, $accu);
$type = new GObject\Type;
$type->name = 'test';
$type->parent = 'GObject';
$type->signals['something1'] = $s1;
$type->generate();
$obj = new test;
$obj->signal_connect('something1', function($self) {
return 1;
});
$obj->signal_connect('something1', function($self) {
return 2;
});
$obj->signal_connect('something1', function($self) {
return 3;
});
$result = $obj->emit('something1');
var_dump($result === 6);
?>
==DONE==
--EXPECT--
bool(true)
==DONE==
Function Calls
extension_loaded | 1 |
Stats
MD5 | 4dc8149e62b09348b18ca39a9eeba35d |
Eval Count | 0 |
Decode Time | 90 ms |