robot123 - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of robot123.php

  1. <?php
  2. public static String  findYoungestCustomerName(Customer[] a, char c) {
  3.                 String Name =" ";
  4.                 double temp = 100.0;
  5.                
  6.         for (int i=0; i<4; i++)
  7.         {
  8.                
  9.                 if((a[i].getGender()==c)&&(a[i].getAge()<temp))
  10.                 {
  11.                         temp = a[i].getAge();
  12.                                         Name = a[i].getName();
  13.                        
  14.                 }
  15.                
  16.                
  17.                
  18.         }
  19.                 return Name;
  20.         }
  21.  
  22. }
  23.  
File Description
  • robot123
  • PHP Code
  • 26 Aug-2019
  • 302 Bytes
You can Share it: