~ Tilde

The tilde ~ is an operator and a wildcard.

  • ~ is the binary not operator

  • ~ is used in composer configuration to define a minimum version.

<?php

    $a = 3;     // 3
    $b = ~$a;   // -4

?>

Documentation

Related : Not Operator, Binary Not Operator, Bang !