3v4l.org

run code in 300+ PHP versions simultaneously
<?php $DOM = new DOMDocument; $DOM->loadHTML("<table> <tr> <td>Fecha</td> <td>Documento</td> <td>Descripci�³n</td> <td>Transacci�³n</td> <td>Oficina</td> <td>Valor Cheque</td> <td>Valor Total</td> </tr> <tr> <td>31/01/2014</td> <td>36713</td> <td>0</td> <td>Deposito Especial</td> <td>UNICENTRO PEREIRA </td> <td> $ ,00</td> <td> $ 200.000,00</td> </tr> <tr> <td>31/01/2014</td> <td>140131</td> <td>Cuota De Manejo Tarjeta Davilinea.</td> <td>Nota D�©bito</td> <td>UNICENTRO PEREIRA </td> <td> $ ,00</td> <td> $ 9.500,00</td> </tr> </table>"); $items = $DOM->getElementsByTagName('tr'); $doc = array(); function tdrows($elements) { $array = array(); foreach ($elements as $element) { array_push($array, $element->nodeValue); } return $array; } foreach ($items as $node) { array_push($doc, tdrows($node->childNodes)); } unset($doc[0]); foreach($doc as $i) { $fecha = strtotime($i[0]);; $documento = $i[1]; $descripcion = $i[2]; $transaccion = $i[3]; $oficina = $i[4]; $money = $i[6]; $s = preg_replace('|[^0-9]|i', '', $money); $n = (int) $s; $valor = $n; $sql="INSERT INTO consiliacion(fecha,documento,oficina,descripcion,referencia,valor,estado,banco) VALUES ('%i','%s','%s','%s','%s','%d',0,6)"; $sql=sprintf($sql, $fecha, $documento, $oficina, $descripcion, $transaccion, $valor); ?>

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)
5.4.260.0080.03712.37
5.4.250.0040.04112.38
5.4.240.0100.04912.37
5.4.230.0080.05012.36
5.4.220.0040.04012.36
5.4.210.0070.03712.36
5.4.200.0020.04312.36
5.4.190.0070.03712.36
5.4.180.0030.04012.36
5.4.170.0070.03612.38
5.4.160.0060.03912.37
5.4.150.0050.04412.37
5.4.140.0050.04212.05
5.4.130.0040.04812.04
5.4.120.0070.04812.00
5.4.110.0060.03812.00
5.4.100.0050.03912.00
5.4.90.0050.03812.00
5.4.80.0060.03812.00
5.4.70.0040.03911.99
5.4.60.0070.03711.99
5.4.50.0070.03611.99
5.4.40.0080.03511.97
5.4.30.0080.03711.97
5.4.20.0070.03711.96
5.4.10.0070.03411.97
5.4.00.0060.05311.46
5.3.280.0050.03912.71
5.3.270.0080.03912.73
5.3.260.0050.04212.72
5.3.250.0090.04312.72
5.3.240.0070.03912.71
5.3.230.0110.04812.71
5.3.220.0060.04012.68
5.3.210.0090.05112.68
5.3.200.0090.05512.68
5.3.190.0090.04312.68
5.3.180.0050.04012.67
5.3.170.0050.03912.67
5.3.160.0070.03812.67
5.3.150.0050.03812.67
5.3.140.0060.03712.66
5.3.130.0040.04512.65
5.3.120.0060.04212.66
5.3.110.0090.03812.66
5.3.100.0120.03412.12
5.3.90.0090.03712.08
5.3.80.0090.03712.08
5.3.70.0130.03212.07
5.3.60.0060.03812.07
5.3.50.0070.03612.00
5.3.40.0070.03712.00
5.3.30.0060.03611.95
5.3.20.0020.04011.73
5.3.10.0090.03311.69
5.3.00.0030.04111.68
5.2.170.0050.0309.19
5.2.160.0040.0309.19
5.2.150.0070.0299.19
5.2.140.0070.0299.18
5.2.130.0070.0289.15
5.2.120.0020.0339.14
5.2.110.0050.0299.15
5.2.100.0060.0289.16
5.2.90.0040.0309.16
5.2.80.0060.0299.14
5.2.70.0040.0339.14
5.2.60.0040.0319.09
5.2.50.0020.0339.07
5.2.40.0060.0399.04
5.2.30.0050.0339.02
5.2.20.0070.0269.03
5.2.10.0050.0288.94
5.2.00.0080.0268.79
5.1.60.0070.0228.08
5.1.50.0040.0258.08
5.1.40.0050.0248.07
5.1.30.0060.0248.41
5.1.20.0060.0258.44
5.1.10.0050.0268.17
5.1.00.0080.0238.16
5.0.50.0050.0206.68
5.0.40.0050.0196.54
5.0.30.0020.0336.35
5.0.20.0040.0196.32
5.0.10.0020.0216.29
5.0.00.0050.0296.29
4.4.90.0030.0154.77
4.4.80.0030.0164.76
4.4.70.0030.0164.75
4.4.60.0000.0194.75
4.4.50.0020.0164.77
4.4.40.0030.0374.71
4.4.30.0010.0174.76
4.4.20.0070.0124.84
4.4.10.0010.0184.85
4.4.00.0030.0294.76
4.3.110.0030.0164.67
4.3.100.0010.0174.66
4.3.90.0030.0154.64
4.3.80.0040.0254.60
4.3.70.0020.0164.63
4.3.60.0040.0134.63
4.3.50.0030.0154.63
4.3.40.0040.0274.56
4.3.30.0040.0203.36
4.3.20.0030.0153.34
4.3.10.0020.0163.25
4.3.00.0100.0237.27

preferences:
141.23 ms | 1394 KiB | 7 Q