Arcane

Arcane refers to weird features, that are almost unknown or forgotten. They have been with the language since the early versions, and they are eventually removed.

  • It is possible to use ++ on a string containing variables. In that case, trailing letters are augmented by one.

  • strpos() used to accept an integer as second argument: it would convert it automatically to its ASCII equivalent

  • range() used to produce all the values between the interval boundaries, even when the boundaries where one string and one integer

  • Logical operators works on strings, and then, produce strings.

<?php

    $a = 'b';
    echo ++$a; // c

    // 98 is b
    print strpos('abc', 99); // 1
    // This was removed in PHP 8.0

    var_dump(a & 'A' );    // 'A'
    var_dump(a & 'B' );    // '@'

?>

Related : Deprecated, Deprecation