Skip to content

Instantly share code, notes, and snippets.

@GabLeRoux
Last active January 22, 2018 05:53
Show Gist options
  • Select an option

  • Save GabLeRoux/0ed36fdf5bdafbd07dda79da5f4b3b74 to your computer and use it in GitHub Desktop.

Select an option

Save GabLeRoux/0ed36fdf5bdafbd07dda79da5f4b3b74 to your computer and use it in GitHub Desktop.

Revisions

  1. GabLeRoux revised this gist Jan 19, 2018. No changes.
  2. GabLeRoux revised this gist Jan 19, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions why-i-hate-php.md
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,8 @@ Notice: Undefined variable: undefined_shit in /Users/gableroux/nope.php on line
    0please don't print
    ```

    ![nope nope nope nope](https://media1.giphy.com/media/yMaLDA976YtUs/giphy.gif)

    ```
    php --version
    ```
  3. GabLeRoux revised this gist Jan 19, 2018. No changes.
  4. GabLeRoux created this gist Jan 19, 2018.
    29 changes: 29 additions & 0 deletions why-i-hate-php.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    `nope.php`:
    ```php
    <?php

    echo "some undefined variable" + $undefined_shit;
    echo "please don't print";
    ```

    ```bash
    php nope.php
    ```

    Output:
    ```
    PHP Notice: Undefined variable: undefined_shit in /Users/gableroux/nope.php on line 3
    Notice: Undefined variable: undefined_shit in /Users/gableroux/nope.php on line 3
    0please don't print
    ```

    ```
    php --version
    ```

    ```
    PHP 7.0.27 (cli) (built: Jan 5 2018 12:26:39) ( NTS )
    Copyright (c) 1997-2017 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    ```