Git Product home page Git Product logo

Comments (11)

Nightprince avatar Nightprince commented on July 4, 2024 2

What is advantage of using version 5 when all default functions of PHP are removed and must be added manually and there are problems with some functions.

from smarty.

wisskid avatar wisskid commented on July 4, 2024 1

I don't think there's an easy fix for this. Can you change your template to use a foreach loop?

from smarty.

Nightprince avatar Nightprince commented on July 4, 2024 1

I have listed some of functions:

  • key
  • ksort
  • krsort
  • natsort
  • natcasesort
  • asort
  • arsort
  • sort
  • rsort
  • usort
  • uasort
  • uksort
  • shuffle
  • array_walk
  • array_walk_recursive
  • end
  • prev
  • next
  • reset
  • current
  • extract
  • array_multisort
  • array_push
  • array_pop
  • array_shift
  • array_unshift
  • array_splice

from smarty.

wisskid avatar wisskid commented on July 4, 2024 1

@Nightprince for a discussion about the decision to drop support for the use of unregistered callables in v5, see #967. For the breaking change regarding passing variables by reference, I'll use #964 and close this issue.

from smarty.

Nightprince avatar Nightprince commented on July 4, 2024 1

@Nightprince for a discussion about the decision to drop support for the use of unregistered callables in v5, see #967. For the breaking change regarding passing variables by reference, I'll use #964 and close this issue.

Why should issue be closed when problem is not fixed?

from smarty.

wisskid avatar wisskid commented on July 4, 2024 1

So we don't have 2 open issues for the same problem.

from smarty.

Nightprince avatar Nightprince commented on July 4, 2024 1

I suggest you add these as default in Smarty.

from smarty.

Nightprince avatar Nightprince commented on July 4, 2024

No, I don't need foreach.

from smarty.

wisskid avatar wisskid commented on July 4, 2024

Smarty 5 adds support for ternary operator and the null coalescing operator, positional parameters for custom tags and a whole new extension architecture.

from smarty.

Nightprince avatar Nightprince commented on July 4, 2024

Well, they are useful if smarty has no problem with default PHP functions. In version 4, many people may have used many PHP functions in smarty that do not have their list. Finding these functions and also having problems in calling them is a very difficult issue.

from smarty.

wisskid avatar wisskid commented on July 4, 2024

Re-opening this, since it seems #964 is fixed (for Smarty > v4), but we cannot port that fix to Smarty v5.

from smarty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.