3v4l.org

run code in 300+ PHP versions simultaneously
<?php // This library is to rewrite MSYQL queries into formatted text class query2text { private $key_arr; public function addline ($query,$keyword) { $fixed = str_ireplace(" ".$keyword,"<br>&nbsp;".$keyword,$query); return $fixed; } public function convert($query) { $key_arr = array("FROM","LEFT JOIN","RIGHT JOIN","INNER JOIN","OUTER JOIN","WHERE","AND","OR","ORDER","GROUP"); foreach($key_arr AS $key) { $query = $this->addline($query,$key); } $query .= "<br><br>\n"; return $query; } } $query = "SELECT patients.patient_id,patients.last_name,patients.first_name,appts.*,appt_types.type,appt_types.color,appt_types.bgcolor" . ",DATE_FORMAT(appts.start,'%m/%d/%Y') AS date" . ",DATE_FORMAT(appts.start,'%h:%i %p') AS time" . ",TIMEDIFF(appts.end,appts.start) AS duration" . " FROM patients,appts,appt_types" . " WHERE appts.cancelled IS NULL" . " AND YEAR(appts.start)='2014'" . " AND MONTH(appts.start)='04'" . " AND DAY(appts.start)='1'" . " AND patients.patient_id = appts.patient_id" . " AND appts.type = appt_types.appt_type_id" . " AND (appts.type='4'" . " OR appts.type='5'" . " OR appts.type='6'" . " OR appts.type='7'" . " OR appts.type='8'" . " OR appts.type='9'" . " OR appts.type='10'" . " OR appts.type='11'" . " OR appts.type='12'" . " OR appts.type='13'" . " OR appts.type='15'" . " OR appts.type='16'" . " OR appts.type='17'" . " )" . " ORDER BY appts.start" . " ASC LIMIT 0,6"; $q2t = new query2text(); echo "<hr>" . $q2t->convert($query) . "<hr>\n";

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.0110.00416.63
8.3.50.0060.01018.16
8.3.40.0060.00918.67
8.3.30.0120.00618.94
8.3.20.0070.00020.25
8.3.10.0080.00023.71
8.3.00.0080.00020.66
8.2.180.0110.00416.50
8.2.170.0130.00722.96
8.2.160.0110.00420.39
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0150.00426.16
8.2.120.0040.00422.26
8.2.110.0090.00022.14
8.2.100.0040.00817.84
8.2.90.0040.00419.35
8.2.80.0080.00018.03
8.2.70.0030.00717.63
8.2.60.0080.00018.03
8.2.50.0030.00518.07
8.2.40.0040.00418.34
8.2.30.0060.00318.15
8.2.20.0030.00517.78
8.2.10.0030.00517.82
8.2.00.0000.00817.71
8.1.270.0050.00323.79
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0000.01023.64
8.1.230.0070.00419.27
8.1.220.0000.00717.74
8.1.210.0040.00418.77
8.1.200.0030.00617.48
8.1.190.0080.00017.54
8.1.180.0040.00418.10
8.1.170.0050.00318.59
8.1.160.0060.00322.18
8.1.150.0000.00718.71
8.1.140.0000.00817.55
8.1.130.0050.00317.90
8.1.120.0050.00217.53
8.1.110.0000.00717.43
8.1.100.0070.00017.40
8.1.90.0000.00817.53
8.1.80.0050.00317.43
8.1.70.0080.00017.38
8.1.60.0050.00317.64
8.1.50.0050.00317.62
8.1.40.0040.00417.59
8.1.30.0040.00417.58
8.1.20.0000.00917.72
8.1.10.0050.00317.63
8.1.00.0030.00617.43
8.0.300.0030.00618.77
8.0.290.0000.00717.05
8.0.280.0030.00318.56
8.0.270.0000.00717.25
8.0.260.0030.00316.88
8.0.250.0030.00317.05
8.0.240.0030.00316.93
8.0.230.0040.00416.95
8.0.220.0050.00216.85
8.0.210.0000.00817.00
8.0.200.0060.00017.07
8.0.190.0000.00716.91
8.0.180.0000.00716.91
8.0.170.0060.00316.88
8.0.160.0000.00817.05
8.0.150.0000.00816.79
8.0.140.0040.00416.94
8.0.130.0030.00313.38
8.0.120.0070.00016.80
8.0.110.0050.00316.85
8.0.100.0050.00216.97
8.0.90.0070.00016.91
8.0.80.0120.00317.00
8.0.70.0040.00416.95
8.0.60.0040.00416.81
8.0.50.0040.00416.98
8.0.30.0100.00917.16
8.0.20.0090.00817.40
8.0.10.0000.00816.96
8.0.00.0140.00616.64
7.4.330.0050.00015.08
7.4.320.0000.00616.62
7.4.300.0000.00716.67
7.4.290.0040.00416.66
7.4.280.0000.00716.46
7.4.270.0000.00716.68
7.4.260.0070.00016.68
7.4.250.0030.00516.63
7.4.240.0000.00716.61
7.4.230.0030.00316.76
7.4.220.0060.01216.52
7.4.210.0080.00716.61
7.4.200.0000.00816.73
7.4.190.0000.00816.73
7.4.160.0130.00316.55
7.4.150.0150.00317.40
7.4.140.0060.01117.86
7.4.130.0070.01216.61
7.4.120.0090.01116.49
7.4.110.0120.00616.43
7.4.100.0110.00816.66
7.4.90.0100.00716.69
7.4.80.0120.00616.59
7.4.70.0060.01016.61
7.4.60.0120.00616.64
7.4.50.0000.00516.36
7.4.40.0090.00322.77
7.4.30.0100.00716.60
7.4.10.0160.00315.20
7.4.00.0080.00815.05
7.3.330.0050.00013.17
7.3.320.0030.00313.33
7.3.310.0030.00316.23
7.3.300.0040.00416.21
7.3.290.0040.01016.27
7.3.280.0110.00516.29
7.3.270.0100.01317.40
7.3.260.0070.01116.38
7.3.250.0120.00816.67
7.3.240.0170.00016.27
7.3.230.0090.00916.39
7.3.210.0070.01116.28
7.3.200.0090.01219.39
7.3.190.0090.00916.41
7.3.180.0090.00916.75
7.3.170.0180.00416.42
7.3.160.0040.01416.62
7.3.130.0060.01114.88
7.3.120.0050.01114.78
7.3.110.0050.01215.03
7.3.100.0050.00914.86
7.3.90.0050.00715.00
7.3.80.0030.01214.96
7.3.70.0060.00614.67
7.3.60.0070.00414.86
7.3.50.0070.00314.88
7.3.40.0000.01714.82
7.3.30.0060.00614.93
7.3.20.0090.00616.70
7.3.10.0000.01216.57
7.3.00.0020.01016.71
7.2.330.0110.00616.93
7.2.320.0230.00016.71
7.2.310.0100.00716.82
7.2.300.0090.01316.81
7.2.290.0120.00416.69
7.2.260.0110.01115.14
7.2.250.0050.01215.18
7.2.240.0070.00915.15
7.2.230.0080.00715.00
7.2.220.0070.00515.21
7.2.210.0060.00815.10
7.2.200.0000.01015.13
7.2.190.0050.00915.04
7.2.180.0060.00715.00
7.2.170.0060.01115.02
7.2.160.0030.00914.95
7.2.150.0070.01116.82
7.2.140.0040.01116.98
7.2.130.0060.00916.82
7.2.120.0060.00917.03
7.2.110.0000.01716.68
7.2.100.0060.00316.67
7.2.90.0100.00317.00
7.2.80.0060.00617.06
7.2.70.0120.00417.00
7.2.60.0000.01216.99
7.2.50.0040.00816.69
7.2.40.0080.00817.01
7.2.30.0070.01117.03
7.2.20.0040.00717.07
7.2.10.0000.01517.13
7.2.00.0030.01018.25
7.1.330.0100.00315.72
7.1.320.0090.00515.71
7.1.310.0040.00915.79
7.1.300.0040.00915.76
7.1.290.0100.00315.77
7.1.280.0050.00915.78
7.1.270.0050.00815.76
7.1.260.0070.00315.81
7.1.250.0000.01415.98
7.1.240.0110.00315.81
7.1.230.0040.01115.80
7.1.220.0000.01415.83
7.1.210.0060.00615.88
7.1.200.0090.00615.86
7.1.190.0040.00715.56
7.1.180.0070.00415.54
7.1.170.0070.00715.69
7.1.160.0030.01415.57
7.1.150.0070.01015.73
7.1.140.0030.00915.89
7.1.130.0030.00715.86
7.1.120.0000.01215.77
7.1.110.0000.01015.91
7.1.100.0080.00517.09
7.1.90.0070.00715.98
7.1.80.0040.00815.79
7.1.70.0030.00816.41
7.1.60.0130.00517.44
7.1.50.0100.00716.40
7.1.40.0030.01015.60
7.1.30.0030.01015.84
7.1.20.0080.00315.97
7.1.10.0120.00315.74
7.1.00.0050.04318.89
7.0.330.0070.00315.48
7.0.320.0070.00415.36
7.0.310.0060.00315.39
7.0.300.0060.00315.41
7.0.290.0100.00615.57
7.0.280.0050.00515.24
7.0.270.0060.00615.41
7.0.260.0000.01315.36
7.0.250.0050.00315.32
7.0.240.0090.00615.43
7.0.230.0030.00615.46
7.0.220.0000.01015.57
7.0.210.0040.01115.44
7.0.200.0060.00516.14
7.0.190.0000.01515.47
7.0.180.0060.00615.60
7.0.170.0000.01015.39
7.0.160.0030.00715.32
7.0.150.0110.00415.54
7.0.140.0020.04518.79
7.0.130.0050.00315.43
7.0.120.0000.00815.69
7.0.110.0090.00015.42
7.0.100.0090.00615.53
7.0.90.0030.00915.55
7.0.80.0090.00415.40
7.0.70.0000.01215.47
7.0.60.0030.04617.62
7.0.50.0050.02716.57
7.0.40.0080.03216.87
7.0.30.0220.04216.88
7.0.20.0190.02916.88
7.0.10.0130.02716.93
7.0.00.0080.04416.79
5.6.400.0030.01414.48
5.6.390.0040.01114.58
5.6.380.0000.01314.20
5.6.370.0000.01214.43
5.6.360.0060.00614.27
5.6.350.0130.00314.53
5.6.340.0000.00914.78
5.6.330.0000.01414.43
5.6.320.0030.00614.33
5.6.310.0000.00814.48
5.6.300.0080.00814.27
5.6.290.0030.01214.28
5.6.280.0020.04417.74
5.6.270.0070.00714.36
5.6.260.0060.00614.50
5.6.250.0070.00714.31
5.6.240.0060.00614.23
5.6.230.0030.00914.57
5.6.220.0070.00314.21
5.6.210.0040.04617.46
5.6.200.0060.04316.27
5.6.190.0060.03117.46
5.6.180.0220.02817.40
5.6.170.0220.04117.47
5.6.160.0100.04217.52
5.6.150.0080.02016.22
5.6.140.0080.04416.16
5.6.130.0060.04616.23
5.6.120.0070.02317.73
5.6.110.0080.03217.52
5.6.100.0120.04217.87
5.6.90.0050.04617.73
5.6.80.0100.04417.20
5.6.70.0190.03017.44
5.6.60.0090.00614.47
5.6.50.0100.00014.29
5.6.40.0040.01214.29
5.6.30.0060.00614.39
5.6.20.0030.01014.49
5.6.10.0050.00514.09
5.6.00.0000.01414.14
5.5.380.0100.00714.45
5.5.370.0030.00914.09
5.5.360.0070.00714.33
5.5.350.0000.02417.26
5.5.340.0030.03116.07
5.5.330.0090.02517.23
5.5.320.0050.04517.24
5.5.310.0110.02417.13
5.5.300.0030.04816.09
5.5.290.0100.04516.29
5.5.280.0040.04517.70
5.5.270.0080.03317.58
5.5.260.0110.03817.65
5.5.250.0020.02917.56
5.5.240.0130.03617.33
5.5.230.0100.00314.17
5.5.220.0070.00713.97
5.5.210.0090.00314.28
5.5.200.0000.01313.99
5.5.190.0080.00714.15
5.5.180.0060.00614.25
5.5.170.0110.00414.32
5.5.160.0000.00813.93
5.5.150.0060.00314.45
5.5.140.0070.00714.06
5.5.130.0070.01014.36
5.5.120.0030.00614.37
5.5.110.0040.00814.22
5.5.100.0050.00514.08
5.5.90.0030.00614.45
5.5.80.0090.00614.13
5.5.70.0070.01014.30
5.5.60.0030.01014.22
5.5.50.0000.01114.43
5.5.40.0000.01313.91
5.5.30.0030.01014.14
5.5.20.0000.01314.35
5.5.10.0000.00914.28
5.5.00.0040.01114.05
5.4.450.0500.02815.68
5.4.440.0430.04415.72
5.4.430.0490.03015.63
5.4.420.0050.04515.68
5.4.410.0560.03015.59
5.4.400.0370.03015.47
5.4.390.0090.03215.43
5.4.380.0100.03115.21
5.4.370.0130.02815.18
5.4.360.0130.02815.25
5.4.350.0120.02715.36
5.4.340.0080.03315.34
5.4.330.0100.00011.88
5.4.320.0080.02012.20
5.4.310.0020.02612.19
5.4.300.0020.02412.20
5.4.290.0050.02212.20
5.4.280.0050.02212.15
5.4.270.0080.01812.13
5.4.260.0090.02012.13
5.4.250.0040.02212.13
5.4.240.0070.02112.13
5.4.230.0050.02912.13
5.4.220.0060.02012.13
5.4.210.0040.02212.12
5.4.200.0030.02312.13
5.4.190.0020.02312.13
5.4.180.0050.02412.12
5.4.170.0070.02112.13
5.4.160.0060.01912.13
5.4.150.0020.02712.12
5.4.140.0040.02211.96
5.4.130.0050.01911.96
5.4.120.0060.02111.94
5.4.110.0010.02511.94
5.4.100.0060.01811.93
5.4.90.0040.02211.94
5.4.80.0060.02211.94
5.4.70.0040.02111.93
5.4.60.0040.02111.93
5.4.50.0040.02111.94
5.4.40.0070.01811.93
5.4.30.0040.02211.93
5.4.20.0060.02411.93
5.4.10.0050.02411.93
5.4.00.0060.02311.67
5.3.290.0040.02212.34
5.3.280.0020.02312.29
5.3.270.0090.02412.30
5.3.260.0050.03112.30
5.3.250.0060.02212.30
5.3.240.0060.02012.30
5.3.230.0030.02212.30
5.3.220.0070.02012.28
5.3.210.0060.02212.28
5.3.200.0040.02212.28
5.3.190.0060.02112.28
5.3.180.0060.02312.28
5.3.170.0050.02312.28
5.3.160.0040.02612.28
5.3.150.0040.02212.28
5.3.140.0060.02212.27
5.3.130.0060.02212.27
5.3.120.0040.02212.27
5.3.110.0070.02312.27
5.3.100.0040.02212.00
5.3.90.0040.02411.98
5.3.80.0050.02511.98
5.3.70.0080.02211.98
5.3.60.0040.02411.97
5.3.50.0020.02611.94
5.3.40.0030.02511.94
5.3.30.0060.02111.92
5.3.20.0100.01811.81
5.3.10.0020.02411.79
5.3.00.0070.01811.79
5.2.170.0080.0279.19
5.2.160.0050.0299.19
5.2.150.0050.0309.19
5.2.140.0040.0379.19
5.2.130.0060.0289.15
5.2.120.0030.0309.15
5.2.110.0030.0319.15
5.2.100.0060.0309.16
5.2.90.0050.0369.15
5.2.80.0050.0389.15
5.2.70.0080.0279.14
5.2.60.0090.0259.10
5.2.50.0050.0309.07
5.2.40.0050.0299.04
5.2.30.0030.0329.02
5.2.20.0130.0549.01
5.2.10.0060.0358.92
5.2.00.0030.0318.77
5.1.60.0020.0268.05
5.1.50.0050.0248.06
5.1.40.0050.0258.05
5.1.30.0030.0278.39
5.1.20.0030.0278.42
5.1.10.0030.0328.14
5.1.00.0060.0258.14
5.0.50.0040.0206.61
5.0.40.0060.0276.48
5.0.30.0040.0346.29
5.0.20.0030.0266.26
5.0.10.0070.0166.23
5.0.00.0040.0306.23
4.4.90.0030.0164.78
4.4.80.0010.0174.76
4.4.70.0030.0154.76
4.4.60.0010.0174.76
4.4.50.0030.0164.77
4.4.40.0040.0304.71
4.4.30.0010.0174.76
4.4.20.0030.0214.85
4.4.10.0020.0164.85
4.4.00.0030.0244.76
4.3.110.0010.0184.67
4.3.100.0020.0234.66
4.3.90.0040.0134.63
4.3.80.0040.0254.58
4.3.70.0020.0164.63
4.3.60.0030.0144.62
4.3.50.0020.0214.63
4.3.40.0020.0254.54
4.3.30.0000.0183.29
4.3.20.0050.0183.27
4.3.10.0030.0153.23
4.3.00.0030.01713.14

preferences:
63.31 ms | 400 KiB | 5 Q