3v4l.org

run code in 300+ PHP versions simultaneously
ini_set('display_errors',1); error_reporting(E_ALL); function globe_receive_sms(){ $in = file_get_contents("php://input"); /* temporary storage */ $list = array(); /* available in PHP5 is the DOMDocument class which we can use to parse XML */ $doc = new DOMDocument(); $doc->loadXML($in); /* here we just iterate through the XML and store the data points into the $list array */ $params = $doc->getElementsByTagName("param"); foreach( $params as $param ) { $names = $param->getElementsByTagName("name"); $name = $names->item(0)->nodeValue; $values = $param->getElementsByTagName("value"); $value = $values->item(0)->nodeValue; $list[$name] = mysql_escape_string($value); list($action, $name, $address, $course, $yearlevel)=explode ('/',$list); list($action, $event,$location,$time) = explode('/',$list); if($action == 'reg') { $db=mysql_connect("localhost", "mnccyf1", "jya0312@") or die ("Cannot connect to DB!"); mysql_select_db("cyfdb") or die("Cannot select DB!"); $sql="INSERT INTO mydb (name,address,course,yearlevel) VALUES ('$name','$address','$course','$yearlevel')"; $r = mysql_query($sql); if(!$r) { $err=mysql_error(); print $err; exit();} $mysql_close($db); } else if('KEYWORD' == 'MEDICATION'){ $message = MESSAGE; //the query to mysql yung message then return sms } { $link=mysql_connect("localhost", "****", "*****") or die ("Cannot connect to DB!"); mysql_select_db("cyfdb") or die("Cannot select DB!"); $sql = "SELECT event,location,time from activity"; while($r = mysql_fetch_array($sql)){ $items[] = array('event'=>$r['event'], 'location'=>$r['location'], 'date'=>$r['date']); } return $items; $mysql_close($link); } return $list; } }<?php

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0090.00918.31
8.3.50.0080.00821.94
8.3.40.0120.00318.72
8.3.30.0100.00318.92
8.3.20.0040.00420.20
8.3.10.0080.00023.66
8.3.00.0080.00020.87
8.2.180.0110.01117.98
8.2.170.0120.00322.96
8.2.160.0160.00020.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.01126.16
8.2.120.0040.00419.01
8.2.110.0040.00421.97
8.2.100.0080.00417.78
8.2.90.0080.00018.99
8.2.80.0000.00817.97
8.2.70.0070.00217.50
8.2.60.0040.00917.80
8.2.50.0050.00318.07
8.2.40.0080.00019.65
8.2.30.0000.00718.17
8.2.20.0040.00417.59
8.2.10.0050.00317.88
8.2.00.0080.00017.41
8.1.280.0100.01025.92
8.1.270.0030.00623.87
8.1.260.0050.00226.35
8.1.250.0070.00728.09
8.1.240.0030.00624.01
8.1.230.0040.00818.97
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0000.01117.22
8.1.190.0040.00417.00
8.1.180.0030.00618.10
8.1.170.0070.00418.48
8.1.160.0070.00021.94
8.1.150.0000.00818.39
8.1.140.0040.00417.18
8.1.130.0000.00717.75
8.1.120.0030.00317.22
8.1.110.0030.00517.25
8.1.100.0040.00417.30
8.1.90.0000.00717.34
8.1.80.0040.00417.34
8.1.70.0030.00317.17
8.1.60.0000.00717.45
8.1.50.0050.00317.41
8.1.40.0030.00617.38
8.1.30.0030.00617.39
8.1.20.0040.00417.43
8.1.10.0040.00417.32
8.1.00.0040.00417.21
8.0.300.0000.00718.77
8.0.290.0080.00016.75
8.0.280.0000.00818.36
8.0.270.0030.00317.10
8.0.260.0000.00617.17
8.0.250.0000.00716.70
8.0.240.0040.00416.80
8.0.230.0000.00716.85
8.0.220.0030.00316.78
8.0.210.0070.00016.62
8.0.200.0040.00416.79
8.0.190.0030.00316.80
8.0.180.0000.00816.75
8.0.170.0030.00516.73
8.0.160.0040.00416.59
8.0.150.0050.00216.63
8.0.140.0040.00416.70
8.0.130.0030.00313.18
8.0.120.0080.00016.76
8.0.110.0000.00716.75
8.0.100.0070.00016.62
8.0.90.0000.00716.70
8.0.80.0060.00916.72
8.0.70.0040.00416.77
8.0.60.0030.00316.65
8.0.50.0080.00016.73
8.0.30.0110.00816.88
8.0.20.0140.00517.40
8.0.10.0030.00316.80
8.0.00.0140.00516.76
7.4.330.0000.00515.00
7.4.320.0060.00016.37
7.4.300.0030.00316.46
7.4.290.0060.00316.41
7.4.280.0040.00416.44
7.4.270.0030.00316.39
7.4.260.0000.00916.43
7.4.250.0070.00016.32
7.4.240.0050.00216.47
7.4.230.0070.00016.39
7.4.220.0130.00316.32
7.4.210.0080.00816.45
7.4.200.0040.00416.46
7.4.160.0080.00816.46
7.4.150.0070.01017.40
7.4.140.0110.00617.86
7.4.130.0080.01016.45
7.4.120.0160.00316.25
7.4.110.0110.00716.36
7.4.100.0090.00916.57
7.4.90.0110.00616.40
7.4.80.0000.01719.39
7.4.70.0120.00916.55
7.4.60.0070.01016.48
7.4.50.0000.00916.22
7.4.40.0090.01216.38
7.4.30.0060.01016.47
7.3.330.0000.00712.98
7.3.320.0000.00512.93
7.3.310.0040.00416.07
7.3.300.0000.00716.12
7.3.290.0030.01716.06
7.3.280.0060.01116.07
7.3.270.0090.00917.40
7.3.260.0070.01016.63
7.3.250.0150.00416.20
7.3.240.0040.01816.42
7.3.230.0090.00616.39
7.3.210.0070.01016.27
7.3.200.0120.00919.39
7.3.190.0040.01716.35
7.3.180.0070.01016.44
7.3.170.0030.01416.39
7.3.160.0040.01216.39
7.2.330.0040.02116.28
7.2.320.0090.00916.24
7.2.310.0060.01516.32
7.2.300.0100.00716.55
7.2.290.0080.00816.52
5.5.70.0000.03720.11
5.5.60.0030.03719.96
5.5.50.0000.03720.05
5.5.40.0030.03020.04
5.5.30.0030.08720.03
5.5.20.0030.06020.02
5.5.10.0070.07720.15
5.5.00.0030.05720.10
5.4.230.0000.03719.02
5.4.220.0000.04718.78
5.4.210.0000.03718.93
5.4.200.0070.05319.06
5.4.190.0030.06719.11
5.4.180.0030.07318.80
5.4.170.0030.03718.80
5.4.160.0070.04319.10
5.4.150.0030.04018.94
5.4.140.0030.06316.40
5.4.130.0000.07716.33
5.4.120.0070.07316.26
5.4.110.0030.07716.33
5.4.100.0030.07716.45
5.4.90.0000.04016.24
5.4.80.0000.06016.36
5.4.70.0100.07316.22
5.4.60.0030.07316.41
5.4.50.0070.07316.18
5.4.40.0030.06316.24
5.4.30.0000.05016.28
5.4.20.0030.07016.28
5.4.10.0000.06316.46
5.4.00.0070.07015.51
5.3.290.0030.03714.63
5.3.280.0030.03314.44
5.3.270.0230.04314.59
5.3.260.0030.06014.59
5.3.250.0030.03714.61
5.3.240.0130.04714.55
5.3.230.0070.06714.53
5.3.220.0100.06714.39
5.3.210.0070.07014.54
5.3.200.0030.06014.54
5.3.190.0070.07714.51
5.3.180.0030.08014.57
5.3.170.0030.08314.55
5.3.160.0030.07714.38
5.3.150.0000.06014.50
5.3.140.0030.08014.54
5.3.130.0030.08314.49
5.3.120.0070.08014.53
5.3.110.0100.07314.50
5.3.100.0130.06314.03
5.3.90.0000.04013.87
5.3.80.0130.06714.00
5.3.70.0070.05313.96
5.3.60.0030.07314.00
5.3.50.0000.07313.70
5.3.40.0030.07313.90
5.3.30.0070.07013.89
5.3.20.0000.04013.64
5.3.10.0030.06713.40
5.3.00.0000.07313.58
5.2.170.0070.06312.79
5.2.160.0030.06012.79
5.2.150.0030.05312.79
5.2.140.0000.05012.79
5.2.130.0030.04312.79
5.2.120.0100.04312.79
5.2.110.0030.05712.79
5.2.100.0000.06312.79
5.2.90.0030.05012.79
5.2.80.0030.06312.79
5.2.70.0030.04712.79
5.2.60.0030.06312.79
5.2.50.0030.06312.79
5.2.40.0000.06312.79
5.2.30.0070.05712.79
5.2.20.0070.06012.79
5.2.10.0070.06012.79
5.2.00.0030.05012.79
5.1.60.0000.03712.79
5.1.50.0070.05312.79
5.1.40.0070.05012.79
5.1.30.0000.05712.79
5.1.20.0030.05712.79
5.1.10.0030.05012.79
5.1.00.0070.05312.79
5.0.50.0000.03312.79
5.0.40.0070.04012.79
5.0.30.0000.04312.79
5.0.20.0070.03712.79
5.0.10.0100.04012.79
5.0.00.0030.06312.79
4.4.90.0030.02012.79
4.4.80.0000.03712.79
4.4.70.0000.02712.79
4.4.60.0000.03712.79
4.4.50.0000.03312.79
4.4.40.0030.05312.79
4.4.30.0000.03712.79
4.4.20.0000.03712.79
4.4.10.0000.02712.79
4.4.00.0000.04012.79
4.3.110.0070.02312.79
4.3.100.0030.03312.79
4.3.90.0030.03312.79
4.3.80.0000.04712.79
4.3.70.0000.02712.79
4.3.60.0070.03012.79
4.3.50.0000.03712.79
4.3.40.0000.05012.79
4.3.30.0000.04012.79
4.3.20.0000.04012.79
4.3.10.0000.03012.79
4.3.00.0030.02712.79

preferences:
35.42 ms | 401 KiB | 5 Q