File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
test/php/lang/ast/unittest/emit Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ protected function returnType($name) {
35
35
36
36
protected function catches ($ catch ) {
37
37
$ last = array_pop ($ catch [0 ]);
38
- $ label = ' c ' . crc32 ($ last );
38
+ $ label = sprintf ( ' c%u ' , crc32 ($ last) );
39
39
foreach ($ catch [0 ] as $ type ) {
40
40
$ this ->out ->write ('catch( ' .$ type .' $ ' .$ catch [1 ].') { goto ' .$ label .'; } ' );
41
41
}
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ protected function returnType($name) {
31
31
32
32
protected function catches ($ catch ) {
33
33
$ last = array_pop ($ catch [0 ]);
34
- $ label = ' c ' . crc32 ($ last );
34
+ $ label = sprintf ( ' c%u ' , crc32 ($ last) );
35
35
foreach ($ catch [0 ] as $ type ) {
36
36
$ this ->out ->write ('catch( ' .$ type .' $ ' .$ catch [1 ].') { goto ' .$ label .'; } ' );
37
37
}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ protected function type($code) {
30
30
$ out = new MemoryOutputStream ();
31
31
$ emit = Emitter::forRuntime (PHP_VERSION )->newInstance (new StringWriter ($ out ));
32
32
$ emit ->emit ($ parse ->execute ());
33
-
33
+ // var_dump($out->getBytes());
34
34
self ::$ cl ->setClassBytes ($ name , $ out ->getBytes ());
35
35
return self ::$ cl ->loadClass ($ name );
36
36
}
You can’t perform that action at this time.
0 commit comments