puiu91
6/3/2016 - 3:47 PM

Examples of Verbose Comments

Examples of Verbose Comments

ensure image is base64 ---
  |      |    |   |
  |      |    |  state of being
  |      |    |     
  |      |  boolean   
  |      |
  |   the variable
  | 
means to validate
<?php

'imageBase64' => [

    'filter' => FILTER_CALLBACK,
    'options' => function($image) {
        // returns null if input contains characters from outside the base64 alphabet
        // input contains characters from outside the base64 alphabet?
        // input has characters from outside the base64 alphabet?
        // input characters from outside the base64 alphabet?
        // characters from outside the base64 alphabet?
        // characters outside of the base64 alphabet?
        // characters outside the base64 alphabet?
        // characters outside of base64 alphabet?
        // characters outside base64 alphabet?
        // is in base64 alphabet
        // isBase64()
        return base64_decode($image, true) ? $image : null;
    },

],