- Output for 8.1.0 - 8.1.30, 8.2.0 - 8.2.24, 8.3.0 - 8.3.12
- a
<?php
namespace A;
$version = '10.';
if (str_starts_with($version, '10.')) {
class Comparator {
public static function test() {
echo "a";
}
}
} else {
class Comparator {
public static function test() {
echo "b";
}
}
}
Comparator::test();