3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!defined('JSON_UNESCAPED_UNICODE')) { define('JSON_UNESCAPED_SLASHES', 64); define('JSON_UNESCAPED_UNICODE', 256); } $original = 'test/'; // what master does // CompatibilityHelper->escapeTerm $master = str_replace('/', '\\' . '/', $original); $master_a = array('query' => $master); $omp917 = str_replace('/', '\\\\' . '/', $original); // Elastica/Transport/Http $master_j = json_encode($master_a, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); $master_j = str_replace('\/', '/', $master_j); $omp917_j = json_encode($master_a, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); $omp917_j = str_replace('\/', '/', $master_j); $r = array( 'master' => $master_j, 'omp-917' => $omp917_j ) var_dump($r);

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.310.0400.05018.98
5.4.300.0400.06719.08
5.4.290.0370.05318.95
5.4.280.0470.05719.19
5.4.270.0500.06018.95
5.4.260.0530.05719.09
5.4.250.0600.05719.21
5.4.240.0500.05719.16
5.4.230.0530.04719.14
5.4.220.0630.05319.20
5.4.210.0530.05318.98
5.4.200.0470.06319.30
5.4.190.0400.03018.85
5.4.180.0400.03319.19
5.4.170.0330.04319.23
5.4.160.0370.04019.20
5.4.150.0430.03319.13
5.4.140.0330.03716.50
5.4.130.0300.04016.30
5.4.120.0430.05316.41
5.4.110.0530.06016.50
5.4.100.0400.05716.45
5.4.90.0370.05716.36
5.4.80.0370.04016.26
5.4.70.0470.06016.55
5.4.60.0430.06016.55
5.4.50.0370.03716.53
5.4.40.0400.03716.56
5.4.30.0470.05016.50
5.4.20.0370.03316.38
5.4.10.0430.03716.32
5.4.00.0430.02715.74
5.3.290.0430.07314.72
5.3.280.0470.06714.54
5.3.270.0500.03314.45
5.3.260.0470.04014.70
5.3.250.0430.03314.46
5.3.240.0400.06014.55
5.3.230.0530.06714.46
5.3.220.0630.05714.45
5.3.210.0500.07014.41
5.3.200.0630.05714.51
5.3.190.0570.05714.59
5.3.180.0530.04314.42
5.3.170.0430.04714.43
5.3.160.0570.04014.66
5.3.150.0370.04314.43
5.3.140.0500.03714.54
5.3.130.0400.04714.41
5.3.120.0500.05014.65
5.3.110.0400.05314.46
5.3.100.0400.04013.98
5.3.90.0470.06013.98
5.3.80.0570.06013.82
5.3.70.0530.06314.11
5.3.60.0530.06013.79
5.3.50.0470.04714.05
5.3.40.0430.05013.90
5.3.30.0530.06013.87
5.3.20.0570.05713.63
5.3.10.0530.05713.56
5.3.00.0500.04313.59
5.2.170.0400.03712.37
5.2.160.0570.03712.37
5.2.150.0400.03712.37
5.2.140.0470.04712.37
5.2.130.0500.03012.37
5.2.120.0430.05312.37
5.2.110.0400.03312.37
5.2.100.0430.05712.37
5.2.90.0400.04312.37
5.2.80.0400.05312.37
5.2.70.0430.04712.37
5.2.60.0530.04012.37
5.2.50.0470.03312.37
5.2.40.0270.03012.37
5.2.30.0270.03012.37
5.2.20.0370.05312.37
5.2.10.0330.04012.37
5.2.00.0370.05012.37
5.1.60.0370.03712.37
5.1.50.0330.02312.37
5.1.40.0330.04712.37
5.1.30.0370.03012.37
5.1.20.0300.04712.37
5.1.10.0330.05012.37
5.1.00.0230.05312.37
5.0.50.0170.02712.37
5.0.40.0170.02012.37
5.0.30.0170.03312.37
5.0.20.0170.01712.37
5.0.10.0230.02312.37
5.0.00.0130.04312.37
4.4.90.0200.02712.37
4.4.80.0200.02712.37
4.4.70.0130.01712.37
4.4.60.0170.02012.37
4.4.50.0170.01312.37
4.4.40.0030.03312.37
4.4.30.0230.02012.37
4.4.20.0100.01312.37
4.4.10.0170.03312.37
4.4.00.0130.03712.37
4.3.110.0130.04012.37
4.3.100.0200.03312.37
4.3.90.0170.01312.37
4.3.80.0130.04712.37
4.3.70.0170.03312.37
4.3.60.0130.03012.37
4.3.50.0230.03012.37
4.3.40.0170.03712.37
4.3.30.0130.02012.37
4.3.20.0100.03712.37
4.3.10.0130.01012.37
4.3.00.0070.02712.37

preferences:
141.77 ms | 1386 KiB | 7 Q