3v4l.org

run code in 300+ PHP versions simultaneously
<?php render($t,$v=null){     function _rh(&$f,&$v) {       static $m;$m?:$m=array();       if(isset($m[$f])) return $m[$f];       for($t=strtok($f,'.'),$q=isset($v[$t])?$v:'';         isset($q[$t])&&$t!==false;         $q=isset($q[$t])?$q[$t]:'',$t=strtok('.')        ); return $m[$f]=($t?'':$q);     }     $t = is_array($t)?'':$t; if(empty($v)) return $t;     for ($e=explode('{{',$t),$r=$e[$i=0];       isset($e[++$i]) && $ss=explode('}}',$e[$i]);       $r.=(strpos($q=trim($ss[0]),'.')!==false?       _rh($q,$v):(isset($v[$q])?$v[$q]:''))       .end($ss));return $r;   } echo render('My name is {{name}}, I\'m {{job.role}} at {{job.info.agency}}, {{job.place}}. [{{job.info.url}}].',[   'name' => 'Stefano',   'job' => [     'role' => 'CTO',     'place' => 'Italy',     'info' => [       'agency' => 'Caffeina',       'url' => 'http://caffeina.co',     ],   ], ]);

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.320.0080.04014.70
5.4.310.0040.04414.76
5.4.300.0060.04214.73
5.4.290.0080.04014.73
5.4.280.0040.04214.69
5.4.270.0080.03814.59
5.4.260.0060.04414.65
5.4.250.0080.04014.60
5.4.240.0050.04314.63
5.4.230.0050.04314.55
5.4.220.0060.04314.69
5.4.210.0070.04014.68
5.4.200.0080.04513.88
5.4.190.0070.04014.61
5.4.180.0090.03814.64
5.4.170.0050.04314.66
5.4.160.0070.04314.58
5.4.150.0090.04214.58
5.4.140.0070.04413.54
5.4.130.0060.03913.59
5.4.120.0090.04213.42
5.4.110.0070.03913.50
5.4.100.0060.04013.50
5.4.90.0040.04313.54
5.4.80.0060.04613.44
5.4.70.0050.04213.46
5.4.60.0080.03513.48
5.4.50.0070.03613.41
5.4.40.0050.03913.43
5.4.30.0060.03813.52
5.4.20.0050.04013.39
5.4.10.0050.04113.51
5.4.00.0080.03812.90
5.3.290.0060.04513.42
5.3.280.0040.04713.30
5.3.270.0060.04313.30
5.3.260.0070.04113.32
5.3.250.0080.04013.33
5.3.240.0070.04213.27
5.3.230.0050.04513.30
5.3.220.0050.04213.29
5.3.210.0070.04213.27
5.3.200.0050.04213.31
5.3.190.0050.04313.31
5.3.180.0070.04413.25
5.3.170.0060.04313.25
5.3.160.0050.04113.25
5.3.150.0060.04313.25
5.3.140.0060.04013.22
5.3.130.0040.04413.29
5.3.120.0050.04513.23
5.3.110.0070.04513.29
5.3.100.0070.04212.70
5.3.90.0060.04012.66
5.3.80.0060.04012.69
5.3.70.0050.04112.66
5.3.60.0070.03912.71
5.3.50.0090.03712.60
5.3.40.0050.04012.58
5.3.30.0080.03612.56
5.3.20.0080.04312.39
5.3.10.0060.03912.29
5.3.00.0030.04212.28
5.2.170.0040.0359.85
5.2.160.0040.0349.83
5.2.150.0050.0409.83
5.2.140.0050.0369.77
5.2.130.0030.0349.82
5.2.120.0050.0369.77
5.2.110.0030.0369.83
5.2.100.0060.0359.72
5.2.90.0050.0339.77
5.2.80.0050.0359.75
5.2.70.0030.0379.76
5.2.60.0020.0369.71
5.2.50.0030.0369.64
5.2.40.0040.0329.69
5.2.30.0040.0339.64
5.2.20.0060.0369.66
5.2.10.0060.0319.58
5.2.00.0030.0339.42
5.1.60.0060.0268.68
5.1.50.0080.0268.66
5.1.40.0020.0298.66
5.1.30.0070.0289.04
5.1.20.0040.0299.01
5.1.10.0060.0268.75
5.1.00.0080.0248.75
5.0.50.0080.0197.26
5.0.40.0040.0217.15
5.0.30.0030.0346.93
5.0.20.0050.0216.93
5.0.10.0020.0236.84
5.0.00.0050.0326.92
4.4.90.0030.0175.11
4.4.80.0020.0215.12
4.4.70.0040.0195.09
4.4.60.0050.0155.09
4.4.50.0020.0185.09
4.4.40.0030.0305.07
4.4.30.0030.0165.12
4.4.20.0030.0165.20
4.4.10.0010.0195.17
4.4.00.0030.0285.13
4.3.110.0030.0215.05
4.3.100.0040.0205.02
4.3.90.0030.0165.02
4.3.80.0040.0284.96
4.3.70.0030.0174.99
4.3.60.0030.0154.98
4.3.50.0030.0175.00
4.3.40.0030.0254.89
4.3.30.0020.0214.05
4.3.20.0030.0174.04
4.3.10.0020.0174.01
4.3.00.0000.0237.14

preferences:
151.37 ms | 1394 KiB | 7 Q