3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Display the platform scores added together $database = new PDO('mysql:host=db452664775.db.1and1.com;dbname=db452664775;charset=utf8', 'dbo452664775', '$h13ld@l13n'); //read the android scores from the MYSQL database $query = $database->prepare("SELECT * FROM `MinionTotalsAndroid` WHERE 1"); $query->execute(); $android = $query->fetchAll();// as $android; echo ($android[scoreTotal]); //read the iphone scores from the MYSQL database $query2 = $database->prepare("SELECT * FROM `MinionTotalsiPhone` WHERE 1"); $query2->execute(); $iOS = $query2->fetchAll();// as $iOS;; //calculate the Accuracy to 2 decimal places //number_format( (($android['rktsHit'] + $iOS['rktsHit'] ) / ( $android['rktsFired'] + $iOS['rktsFired'])) * 100, 2); echo ($android['scoreTotal'] + $iOS['scoreTotal']) . '-' .($android['junkTotal'] + $iOS['junkTotal']) . '-' .($android['shpKlldByAstrd']+ $iOS['shpKlldByAstrd']) . '-' .($android['shpKlldBySatlt']+ $iOS['shpKlldBySatlt']) . '-' .($android['shpKlldByWrm'] + $iOS['shpKlldByWrm']) . '-' .($android['shpKlldByPrt'] + $iOS['shpKlldByPrt']) . '-' .($android['deathsTotal'] + $iOS['deathsTotal']) . '-' .($android['minKlldByAst'] + $iOS['minKlldByAst']) . '-' .($android['minKlldBySatlt']+ $iOS['minKlldBySatlt']) . '-' .($android['minKlldByWrm'] + $iOS['minKlldByWrm']) . '-' .($android['minKlldByPrt'] + $iOS['minKlldByPrt']) . '-' .($android['deathsTotal'] + $iOS['deathsTotal']) . '-' .($android['shldUsd'] + $iOS['shldUsd']) . '-' .($android['shldDstryd'] + $iOS['shldDstryd']) . '-' .($android['hmngUsd'] + $iOS['hmngUsd']) . '-' .($android['pwrUsd'] + $iOS['pwrUsd']) . '-' .($android['rktsFired'] + $iOS['rktsFired']) . '-' .($android['rktsHit'] + $iOS['rktsHit']) . '-' .($android['rktsMssd'] + $iOS['rktsMssd']) . '-' .(number_format( (($android['rktsHit'] + $iOS['rktsHit'] ) / ( $android['rktsFired'] + $iOS['rktsFired'])) * 100, 2)) . '-' .($android['astKlldByShp'] + $iOS['astKlldByShp']) . '-' .($android['astrdKlldByMin']+ $iOS['astrdKlldByMin']) . '-' .($android['astrdEscp'] + $iOS['astrdEscp']) . '-' .($android['astrdKlls'] + $iOS['astrdKlls']) . '-' .($android['satltKlldByShp']+ $iOS['satltKlldByShp']) . '-' .($android['satltKlldByMin']+ $iOS['satltKlldByMin']) . '-' .($android['satltEscp'] + $iOS['satltEscp']) . '-' .($android['satltKlls'] + $iOS['satltKlls']) . '-' .($android['wrmKlldByShp'] + $iOS['wrmKlldByShp']) . '-' .($android['wrmKlldByMin'] + $iOS['wrmKlldByMin']) . '-' .($android['wrmKlls'] + $iOS['wrmKlls']) . '-' .($android['prtKlldByShp'] + $iOS['prtKlldByShp']) . '-' .($android['prtKlldByMin'] + $iOS['prtKlldByMin']) . '-' .($android['prtKlls'] + $iOS['prtKlls']);
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught PDOException: could not find driver in /in/gqKld:3 Stack trace: #0 /in/gqKld(3): PDO->__construct('mysql:host=db45...', 'dbo452664775', '$h13ld@l13n') #1 {main} thrown in /in/gqKld on line 3
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /in/gqKld:3 Stack trace: #0 /in/gqKld(3): PDO->__construct('mysql:host=db45...', 'dbo452664775', '$h13ld@l13n') #1 {main} thrown in /in/gqKld on line 3
Process exited with code 255.