No change necessary, can be overridden with hooks without changes.
class C {
public int $prop;
}
<?php | |
use PhpParser\Node; | |
use PhpParser\NodeTraverser; | |
use PhpParser\NodeVisitorAbstract; | |
use PhpParser\Node\Expr\FuncCall; | |
use PhpParser\Node\Name; | |
use PhpParser\Node\Stmt\Function_; | |
use PhpParser\ParserFactory; |
<?php | |
data class Vec { | |
public function __construct( | |
public $x, | |
public $y, | |
) {} | |
public mutating function double() { | |
$this->x *= 2; |
<?php | |
class Foo { | |
public function __get($name, $scope) { | |
var_dump($scope); | |
return ''; | |
} | |
} | |
$foo = new Foo(); |
#!/bin/bash | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
autoconf \ | |
bison \ | |
ca-certificates \ | |
gcc \ | |
libsqlite3-dev \ | |
libssl-dev \ |
#!/bin/bash | |
make distclean | |
./buildconf | |
./configure --enable-debug CFLAGS="-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address" | |
make -j14 | |
make test TEST_PHP_ARGS="-j14 --asan" |
001+ /home/runner/work/php-src/php-src/Zend/zend_types.h:1208:9: runtime error: member access within misaligned address 0xbebebebebebebebe for type 'struct zend_refcounted', which requires 4 byte alignment | |
001- Exception from valid() | |
002+ 0xbebebebebebebebe: note: pointer points here | |
003+ <memory cannot be printed> | |
004+ /home/runner/work/php-src/php-src/Zend/zend_types.h:1172:2: runtime error: member access within misaligned address 0xbebebebebebebebe for type 'struct zend_refcounted_h', which requires 4 byte alignment | |
005+ 0xbebebebebebebebe: note: pointer points here | |
006+ <memory cannot be printed> | |
007+ AddressSanitizer:DEADLYSIGNAL | |
008+ ================================================================= | |
009+ ==193472==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55f9e9e0c05e bp 0x7fff4073f150 sp 0x7fff4073f130 T0) |
<?php | |
class Foo { | |
public array $bar { | |
get; | |
/** | |
* @param list<string> $path | |
* @param \Closure(list<string> $path, mixed $value, bool $unset): void $update | |
*/ | |
update(array $path, mixed $value, bool $unset, \Closure $update) {} |
import Foundation | |
class Foo { | |
var _numbers: [Int] = [42] | |
var numbers: [Int] { | |
get { _numbers } | |
set(value) { | |
print("Old: ", _numbers) | |
print("New: ", value) | |
} |
<?php error_reporting(E_ALL); | |
$it = new RecursiveIteratorIterator( | |
new RecursiveDirectoryIterator(__DIR__ . '/sources'), | |
RecursiveIteratorIterator::LEAVES_ONLY | |
); | |
$i = 0; | |
$totalOption3 = 0; | |
$totalOption4 = 0; |